@@ -23,11 +23,9 @@ import { CallType } from "matrix-js-sdk/src/webrtc/call";
23
23
import { NamespacedValue } from "matrix-js-sdk/src/NamespacedValue" ;
24
24
import { type IWidgetApiRequest , type ClientWidgetApi , type IWidgetData } from "matrix-widget-api" ;
25
25
import {
26
- MatrixRTCSession ,
26
+ type MatrixRTCSession ,
27
27
MatrixRTCSessionEvent ,
28
- type CallMembership ,
29
28
MatrixRTCSessionManagerEvents ,
30
- type ICallNotifyContent ,
31
29
} from "matrix-js-sdk/src/matrixrtc" ;
32
30
33
31
import type EventEmitter from "events" ;
@@ -44,7 +42,6 @@ import ActiveWidgetStore, { ActiveWidgetStoreEvent } from "../stores/ActiveWidge
44
42
import { getCurrentLanguage } from "../languageHandler" ;
45
43
import { Anonymity , PosthogAnalytics } from "../PosthogAnalytics" ;
46
44
import { UPDATE_EVENT } from "../stores/AsyncStore" ;
47
- import { getJoinedNonFunctionalMembers } from "../utils/room/getJoinedNonFunctionalMembers" ;
48
45
import { isVideoRoom } from "../utils/video-rooms" ;
49
46
import { FontWatcher } from "../settings/watchers/FontWatcher" ;
50
47
import { type JitsiCallMemberContent , JitsiCallMemberEventType } from "../call-types" ;
@@ -858,31 +855,6 @@ export class ElementCall extends Call {
858
855
ElementCall . createOrGetCallWidget ( room . roomId , room . client , skipLobby , isVideoRoom ( room ) ) ;
859
856
}
860
857
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
-
886
858
protected async performConnection (
887
859
audioInput : MediaDeviceInfo | null ,
888
860
videoInput : MediaDeviceInfo | null ,
@@ -912,7 +884,6 @@ export class ElementCall extends Call {
912
884
false , // allow user to wait as long as they want (no timeout)
913
885
) ;
914
886
}
915
- this . sendCallNotify ( ) ;
916
887
}
917
888
918
889
protected async performDisconnection ( ) : Promise < void > {
0 commit comments