From 79411437cff5b95d0655ad0e4f181f59afbe8b23 Mon Sep 17 00:00:00 2001 From: Bruno Windels <274386+bwindels@users.noreply.github.com> Date: Thu, 7 Apr 2022 16:53:57 +0200 Subject: [PATCH] fix who initiates call, needs to be lower, not higher --- src/matrix/calls/group/Member.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/matrix/calls/group/Member.ts b/src/matrix/calls/group/Member.ts index 7404d647..e3b1545b 100644 --- a/src/matrix/calls/group/Member.ts +++ b/src/matrix/calls/group/Member.ts @@ -73,10 +73,11 @@ export class Member { this.localMedia = localMedia; // otherwise wait for it to connect let shouldInitiateCall; + // the lexicographically lower side initiates the call if (this.member.userId === this.options.ownUserId) { - shouldInitiateCall = this.deviceId < this.options.ownDeviceId; + shouldInitiateCall = this.deviceId > this.options.ownDeviceId; } else { - shouldInitiateCall = this.member.userId < this.options.ownUserId; + shouldInitiateCall = this.member.userId > this.options.ownUserId; } if (shouldInitiateCall) { this.peerCall = this._createPeerCall(makeId("c"));