feat: enhance session event handling by including userId for client-side filtering and updating SessionLiveWrapper with currentUserId

This commit is contained in:
Julien Froidefond
2025-11-27 14:38:05 +01:00
parent 15ea89f477
commit 639bb159fe
5 changed files with 21 additions and 2 deletions

View File

@@ -66,6 +66,7 @@ export async function GET(
`data: ${JSON.stringify({
type: event.type,
payload: JSON.parse(event.payload),
userId: event.userId, // Include userId for client-side filtering
user: event.user,
timestamp: event.createdAt,
})}\n\n`

View File

@@ -66,6 +66,7 @@ export default async function SessionPage({ params }: SessionPageProps) {
<SessionLiveWrapper
sessionId={session.id}
sessionTitle={session.title}
currentUserId={authSession.user.id}
shares={session.shares}
isOwner={session.isOwner}
canEdit={session.canEdit}