feat: late-bind dmChannelId on FederatedCallEntry when DM created mid-call

When findOrCreateDmChannel creates or finds a local channel for a
federatedId that has an active FederatedCallEntry with null dmChannelId,
update the entry. Prevents stale null references for Path B calls.
This commit is contained in:
Jannis Braun
2026-04-08 03:20:01 +02:00
parent 07edb25d12
commit 0c57f9491f
+7
View File
@@ -1690,6 +1690,9 @@ function findOrCreateDmChannel(
.run(); .run();
} }
} }
// Late-bind: if a FederatedCallEntry exists for this federatedId with null dmChannelId,
// update it now that we have a local channel
connectionManager.lateBindFederatedCall(federatedId, existing.id);
return existing.id; return existing.id;
} }
@@ -1715,6 +1718,10 @@ function findOrCreateDmChannel(
.run(); .run();
} }
// Late-bind: if a FederatedCallEntry exists for this federatedId with null dmChannelId,
// update it now that we have a local channel
connectionManager.lateBindFederatedCall(federatedId, channelId);
return channelId; return channelId;
} }