mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
Only consider a call accepted if the *intended* recipient picks up
This commit is contained in:
@@ -140,9 +140,9 @@ export function createCallNotificationLifecycle$({
|
|||||||
const timeout$ = timer(notificationEvent.lifetime).pipe(
|
const timeout$ = timer(notificationEvent.lifetime).pipe(
|
||||||
map(() => "timeout" as const),
|
map(() => "timeout" as const),
|
||||||
);
|
);
|
||||||
// Call is accepted when someone else joins
|
// Call is accepted when the recipient joins
|
||||||
const accept$ = memberships$.pipe(
|
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),
|
map(() => "accept" as const),
|
||||||
);
|
);
|
||||||
// Call is declined when we receive a decline event
|
// Call is declined when we receive a decline event
|
||||||
|
|||||||
Reference in New Issue
Block a user