Only consider a call accepted if the *intended* recipient picks up

This commit is contained in:
Robin
2026-06-18 09:16:32 +02:00
parent 8b0f5054dd
commit 05797097c6

View File

@@ -140,9 +140,9 @@ export function createCallNotificationLifecycle$({
const timeout$ = timer(notificationEvent.lifetime).pipe(
map(() => "timeout" as const),
);
// Call is accepted when someone else joins
// Call is accepted when the recipient joins
const accept$ = memberships$.pipe(
filter((ms) => ms.value.some((m) => m.userId !== localUser.userId)),
filter((ms) => ms.value.some((m) => m.userId === recipient)),
map(() => "accept" as const),
);
// Call is declined when we receive a decline event