File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -363,7 +363,20 @@ describe("MatrixRTCSession", () => {
363
363
await Promise . race ( [ sentStateEvent , new Promise ( ( resolve ) => setTimeout ( resolve , 5000 ) ) ] ) ;
364
364
mockRoomState ( mockRoom , [ { ...membershipTemplate , user_id : client . getUserId ( ) ! } ] ) ;
365
365
sess ! . onRTCSessionMemberUpdate ( ) ;
366
+ const ownMembershipId = sess ?. memberships [ 0 ] . eventId ;
366
367
368
+ expect ( client . sendEvent ) . toHaveBeenCalledWith ( mockRoom ! . roomId , EventType . RTCNotification , {
369
+ "m.mentions" : { user_ids : [ ] , room : true } ,
370
+ "notification_type" : "ring" ,
371
+ "m.relates_to" : {
372
+ event_id : ownMembershipId ,
373
+ rel_type : "org.matrix.msc4075.rtc.notification.parent" ,
374
+ } ,
375
+ "lifetime" : 30000 ,
376
+ "sender_ts" : expect . any ( Number ) ,
377
+ } ) ;
378
+
379
+ // check if deprecated notify event is also sent
367
380
expect ( client . sendEvent ) . toHaveBeenCalledWith ( mockRoom ! . roomId , EventType . CallNotify , {
368
381
"application" : "m.call" ,
369
382
"m.mentions" : { user_ids : [ ] , room : true } ,
You can’t perform that action at this time.
0 commit comments