File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
src/components/structures Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -108,24 +108,34 @@ export default class CallEventGrouper extends EventEmitter {
108108 return [ ...this . events ] [ 0 ] . getContent ( ) . call_id ;
109109 }
110110
111+ private get roomId ( ) : string {
112+ return [ ...this . events ] [ 0 ] ?. getRoomId ( ) ;
113+ }
114+
111115 private onSilencedCallsChanged = ( ) => {
112116 const newState = CallHandler . sharedInstance ( ) . isCallSilenced ( this . callId ) ;
113117 this . emit ( CallEventGrouperEvent . SilencedChanged , newState ) ;
114118 } ;
115119
116120 public answerCall = ( ) => {
117- this . call ?. answer ( ) ;
121+ defaultDispatcher . dispatch ( {
122+ action : 'answer' ,
123+ room_id : this . roomId ,
124+ } ) ;
118125 } ;
119126
120127 public rejectCall = ( ) => {
121- this . call ?. reject ( ) ;
128+ defaultDispatcher . dispatch ( {
129+ action : 'reject' ,
130+ room_id : this . roomId ,
131+ } ) ;
122132 } ;
123133
124134 public callBack = ( ) => {
125135 defaultDispatcher . dispatch ( {
126136 action : 'place_call' ,
127137 type : this . isVoice ? CallType . Voice : CallType . Video ,
128- room_id : [ ... this . events ] [ 0 ] ?. getRoomId ( ) ,
138+ room_id : this . roomId ,
129139 } ) ;
130140 } ;
131141
You can’t perform that action at this time.
0 commit comments