Privacy: Tagebuch-Einträge aus Freunde-Aktivitäts-Feed entfernt

Tagebücher sind privat — auch Freunde sollen keine Einblicke bekommen
This commit is contained in:
rene 2026-04-19 11:12:54 +02:00
parent 6d757b86c2
commit 9115f55dac
3 changed files with 2 additions and 23 deletions

View file

@ -221,25 +221,6 @@ async def get_activity(user=Depends(get_current_user)):
ph = ",".join("?" * len(friend_ids))
# Tagebuch-Einträge der Freunde
diary_rows = conn.execute(f"""
SELECT
'diary' AS type,
dg.id AS entry_id,
u.id AS user_id,
u.name AS user_name,
u.avatar_url,
d.name AS dog_name,
d.foto_url AS dog_foto,
dg.titel AS text,
dg.created_at
FROM diary dg
JOIN dogs d ON d.id = dg.dog_id
JOIN users u ON u.id = d.user_id
WHERE d.user_id IN ({ph})
ORDER BY dg.created_at DESC
LIMIT 15
""", friend_ids).fetchall()
# Gesundheitseinträge der Freunde (nur Typ + Datum, kein Inhalt)
health_rows = conn.execute(f"""
SELECT
@ -327,7 +308,7 @@ async def get_activity(user=Depends(get_current_user)):
}
items = []
for row in [*diary_rows, *health_rows, *walk_rows, *forum_rows, *new_dog_rows]:
for row in [*health_rows, *walk_rows, *forum_rows, *new_dog_rows]:
d = dict(row)
t = d["type"]
items.append({