Skip to content

Commit

Permalink
runfix: Allow calls on all browsers in 1to1 (#9261)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyLnd committed Jul 22, 2020
1 parent 7fd87e7 commit b844499
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/script/view_model/CallingViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ export class CallingViewModel {
};

const startCall = (conversationEntity: Conversation, callType: CALL_TYPE): void => {
if (this.callingRepository.supportsConferenceCalling) {
const convType = conversationEntity.isGroup() ? CONV_TYPE.GROUP : CONV_TYPE.ONEONONE;
const convType = conversationEntity.isGroup() ? CONV_TYPE.GROUP : CONV_TYPE.ONEONONE;
if (convType === CONV_TYPE.ONEONONE || this.callingRepository.supportsConferenceCalling) {
this.callingRepository.startCall(conversationEntity.id, convType, callType).then(call => {
if (!call) {
return;
Expand Down Expand Up @@ -169,7 +169,7 @@ export class CallingViewModel {

this.callActions = {
answer: (call: Call) => {
if (this.callingRepository.supportsConferenceCalling) {
if (call.conversationType === CONV_TYPE.ONEONONE || this.callingRepository.supportsConferenceCalling) {
const callType = call.getSelfParticipant().sharesCamera() ? call.initialType : CALL_TYPE.NORMAL;
this.callingRepository.answerCall(call, callType);
} else {
Expand Down
6 changes: 3 additions & 3 deletions src/script/view_model/ListViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

import {CALL_TYPE} from '@wireapp/avs';
import {CALL_TYPE, CONV_TYPE} from '@wireapp/avs';
import {WebAppEvents} from '@wireapp/webapp-events';
import ko from 'knockout';
import {amplify} from 'amplify';
Expand Down Expand Up @@ -221,8 +221,8 @@ export class ListViewModel {
};

answerCall = (conversationEntity: Conversation): void => {
if (this.callingRepository.supportsConferenceCalling) {
const call = this.callingRepository.findCall(conversationEntity.id);
const call = this.callingRepository.findCall(conversationEntity.id);
if (call.conversationType === CONV_TYPE.ONEONONE || this.callingRepository.supportsConferenceCalling) {
if (call) {
const callType = call.getSelfParticipant().sharesCamera() ? call.initialType : CALL_TYPE.NORMAL;
this.callingRepository.answerCall(call, callType);
Expand Down

0 comments on commit b844499

Please sign in to comment.