Fixed notifications, It shows when you get get a

message and from who
This commit is contained in:
2026-06-23 09:59:53 +02:00
parent ba947cea87
commit 491ff52b90
5 changed files with 32 additions and 2 deletions
@@ -19,6 +19,12 @@ export async function POST(
[id, user.id],
)
await query(
`UPDATE notifications SET is_read = TRUE
WHERE user_id = $1 AND context_type = 'conversation' AND context_id = $2 AND is_read = FALSE`,
[user.id, id],
)
return NextResponse.json({ success: true })
} catch (error) {
console.error("Mark read error:", error)