Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 53b3d6f

Browse files
authored
Fix sending call notify (#12211)
Signed-off-by: Timo K <[email protected]>
1 parent 5ffb921 commit 53b3d6f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/models/Call.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -850,13 +850,17 @@ export class ElementCall extends Call {
850850

851851
protected async sendCallNotify(): Promise<void> {
852852
const room = this.room;
853-
const existingRoomCallMembers = MatrixRTCSession.callMembershipsForRoom(room).filter(
853+
const existingOtherRoomCallMembers = MatrixRTCSession.callMembershipsForRoom(room).filter(
854854
// filter all memberships where the application is m.call and the call_id is ""
855-
(m) => m.application === "m.call" && m.callId === "",
855+
(m) => {
856+
const isRoomCallMember = m.application === "m.call" && m.callId === "";
857+
const isThisDevice = m.deviceId === this.client.deviceId;
858+
return isRoomCallMember && !isThisDevice;
859+
},
856860
);
857861

858862
const memberCount = getJoinedNonFunctionalMembers(room).length;
859-
if (!isVideoRoom(room) && existingRoomCallMembers.length == 0) {
863+
if (!isVideoRoom(room) && existingOtherRoomCallMembers.length === 0) {
860864
// send ringing event
861865
const content: ICallNotifyContent = {
862866
"application": "m.call",

0 commit comments

Comments
 (0)