@@ -23,11 +23,9 @@ import { CallType } from "matrix-js-sdk/src/webrtc/call";
2323import { NamespacedValue } from "matrix-js-sdk/src/NamespacedValue" ;
2424import { type IWidgetApiRequest , type ClientWidgetApi , type IWidgetData } from "matrix-widget-api" ;
2525import {
26- MatrixRTCSession ,
26+ type MatrixRTCSession ,
2727 MatrixRTCSessionEvent ,
28- type CallMembership ,
2928 MatrixRTCSessionManagerEvents ,
30- type ICallNotifyContent ,
3129} from "matrix-js-sdk/src/matrixrtc" ;
3230
3331import type EventEmitter from "events" ;
@@ -44,7 +42,6 @@ import ActiveWidgetStore, { ActiveWidgetStoreEvent } from "../stores/ActiveWidge
4442import { getCurrentLanguage } from "../languageHandler" ;
4543import { Anonymity , PosthogAnalytics } from "../PosthogAnalytics" ;
4644import { UPDATE_EVENT } from "../stores/AsyncStore" ;
47- import { getJoinedNonFunctionalMembers } from "../utils/room/getJoinedNonFunctionalMembers" ;
4845import { isVideoRoom } from "../utils/video-rooms" ;
4946import { FontWatcher } from "../settings/watchers/FontWatcher" ;
5047import { type JitsiCallMemberContent , JitsiCallMemberEventType } from "../call-types" ;
@@ -858,31 +855,6 @@ export class ElementCall extends Call {
858855 ElementCall . createOrGetCallWidget ( room . roomId , room . client , skipLobby , isVideoRoom ( room ) ) ;
859856 }
860857
861- protected async sendCallNotify ( ) : Promise < void > {
862- const room = this . room ;
863- const existingOtherRoomCallMembers = MatrixRTCSession . callMembershipsForRoom ( room ) . filter (
864- // filter all memberships where the application is m.call and the call_id is ""
865- ( m ) => {
866- const isRoomCallMember = m . application === "m.call" && m . callId === "" ;
867- const isThisDevice = m . deviceId === this . client . deviceId ;
868- return isRoomCallMember && ! isThisDevice ;
869- } ,
870- ) ;
871-
872- const memberCount = getJoinedNonFunctionalMembers ( room ) . length ;
873- if ( ! isVideoRoom ( room ) && existingOtherRoomCallMembers . length === 0 ) {
874- // send ringing event
875- const content : ICallNotifyContent = {
876- "application" : "m.call" ,
877- "m.mentions" : { user_ids : [ ] , room : true } ,
878- "notify_type" : memberCount == 2 ? "ring" : "notify" ,
879- "call_id" : "" ,
880- } ;
881-
882- await room . client . sendEvent ( room . roomId , EventType . CallNotify , content ) ;
883- }
884- }
885-
886858 protected async performConnection (
887859 audioInput : MediaDeviceInfo | null ,
888860 videoInput : MediaDeviceInfo | null ,
@@ -912,7 +884,6 @@ export class ElementCall extends Call {
912884 false , // allow user to wait as long as they want (no timeout)
913885 ) ;
914886 }
915- this . sendCallNotify ( ) ;
916887 }
917888
918889 protected async performDisconnection ( ) : Promise < void > {
0 commit comments