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

Commit

Permalink
Fix sending call notify (#12211)
Browse files Browse the repository at this point in the history
Signed-off-by: Timo K <toger5@hotmail.de>
  • Loading branch information
toger5 authored Feb 2, 2024
1 parent 5ffb921 commit 53b3d6f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/models/Call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -850,13 +850,17 @@ export class ElementCall extends Call {

protected async sendCallNotify(): Promise<void> {
const room = this.room;
const existingRoomCallMembers = MatrixRTCSession.callMembershipsForRoom(room).filter(
const existingOtherRoomCallMembers = MatrixRTCSession.callMembershipsForRoom(room).filter(
// filter all memberships where the application is m.call and the call_id is ""
(m) => m.application === "m.call" && m.callId === "",
(m) => {
const isRoomCallMember = m.application === "m.call" && m.callId === "";
const isThisDevice = m.deviceId === this.client.deviceId;
return isRoomCallMember && !isThisDevice;
},
);

const memberCount = getJoinedNonFunctionalMembers(room).length;
if (!isVideoRoom(room) && existingRoomCallMembers.length == 0) {
if (!isVideoRoom(room) && existingOtherRoomCallMembers.length === 0) {
// send ringing event
const content: ICallNotifyContent = {
"application": "m.call",
Expand Down

0 comments on commit 53b3d6f

Please sign in to comment.