File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -158,10 +158,7 @@ export class CallingViewModel {
158158
159159 this . callActions = {
160160 answer : ( call : Call ) => {
161- if ( call . conversationType === CONV_TYPE . CONFERENCE && this . callingRepository . supportsConferenceCalling ) {
162- const callType = call . getSelfParticipant ( ) . sharesCamera ( ) ? call . initialType : CALL_TYPE . NORMAL ;
163- this . callingRepository . answerCall ( call , callType ) ;
164- } else {
161+ if ( call . conversationType === CONV_TYPE . CONFERENCE && ! this . callingRepository . supportsConferenceCalling ) {
165162 amplify . publish ( WebAppEvents . WARNING . MODAL , ModalsViewModel . TYPE . ACKNOWLEDGE , {
166163 primaryAction : {
167164 action : ( ) => {
@@ -175,6 +172,9 @@ export class CallingViewModel {
175172 title : t ( 'modalConferenceCallNotSupportedHeadline' ) ,
176173 } ,
177174 } ) ;
175+ } else {
176+ const callType = call . getSelfParticipant ( ) . sharesCamera ( ) ? call . initialType : CALL_TYPE . NORMAL ;
177+ this . callingRepository . answerCall ( call , callType ) ;
178178 }
179179 } ,
180180 leave : ( call : Call ) => {
Original file line number Diff line number Diff line change @@ -222,18 +222,19 @@ export class ListViewModel {
222222
223223 answerCall = ( conversationEntity : Conversation ) : void => {
224224 const call = this . callingRepository . findCall ( conversationEntity . id ) ;
225- if ( call . conversationType === CONV_TYPE . CONFERENCE && this . callingRepository . supportsConferenceCalling ) {
226- if ( call ) {
227- const callType = call . getSelfParticipant ( ) . sharesCamera ( ) ? call . initialType : CALL_TYPE . NORMAL ;
228- this . callingRepository . answerCall ( call , callType ) ;
229- }
230- } else {
225+ if ( ! call ) {
226+ return ;
227+ }
228+ if ( call . conversationType === CONV_TYPE . CONFERENCE && ! this . callingRepository . supportsConferenceCalling ) {
231229 amplify . publish ( WebAppEvents . WARNING . MODAL , ModalsViewModel . TYPE . ACKNOWLEDGE , {
232230 text : {
233231 message : `${ t ( 'modalConferenceCallNotSupportedMessage' ) } ${ t ( 'modalConferenceCallNotSupportedJoinMessage' ) } ` ,
234232 title : t ( 'modalConferenceCallNotSupportedHeadline' ) ,
235233 } ,
236234 } ) ;
235+ } else {
236+ const callType = call . getSelfParticipant ( ) . sharesCamera ( ) ? call . initialType : CALL_TYPE . NORMAL ;
237+ this . callingRepository . answerCall ( call , callType ) ;
237238 }
238239 } ;
239240
You can’t perform that action at this time.
0 commit comments