fix(calls): callee tile while ringing (#7), multi-device decline no longer kills active call (#8), SFU screen-attach retry (#9)

- #7: outgoing 1:1 call shows the person you're calling (DP + name + 'Ringing…')
  instead of only your own tile; removed when they answer or the call ends.
- #8: declineDmCall now ignores the decline if that user has ALREADY accepted on
  another device (they're in the room) — declining the ringing invite on a 2nd
  device no longer tears down the active call.
- #9: sfuAttach retries (bounded) when the uid→peerId map lags the LiveKit track,
  so a shared screen isn't silently dropped due to a race.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 23:18:14 +05:30
parent f52d54a093
commit 1114cd4fda
2 changed files with 28 additions and 6 deletions
+4
View File
@@ -133,6 +133,10 @@ function endCallByRoom(room) { endGroupCallByRoom(room); endDmCallByRoom(room);
function declineDmCall(room, byUser) {
const key = roomToDmCall.get(room); if (!key) return { ok: false };
const call = dmCalls.get(key); if (!call) return { ok: false };
// #8: if this user has ALREADY accepted on another device (they're in the room), this is just the
// ringing invite on a second device — dismiss it silently, do NOT tear down the active call.
const inRoom = meetingRooms.get(room);
if (inRoom) { for (const [, p] of inRoom) { if (p.ws && p.ws._meetingUserId === byUser.id) return { ok: true, alreadyJoined: true }; } }
const callerId = call.users.find((id) => id !== byUser.id) || call.startedBy;
try {
const mid = A.id();