Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/utils/signaling.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ Signaling.Standalone.prototype.connect = function() {
this.pendingMessages = []
this.connected = false
this._forceReconnect = false
this._isRejoiningConversationWithNewSession = false
this.socket = new WebSocket(this.url)
window.signalingSocket = this.socket
this.socket.onopen = function(event) {
Expand Down Expand Up @@ -725,6 +726,8 @@ Signaling.Standalone.prototype.forceReconnect = function(newSession, flags) {
this.leaveCall(this.currentCallToken, true)
}

this._isRejoiningConversationWithNewSession = true

rejoinConversation(this.currentRoomToken)
.then(response => {
this.nextcloudSessionId = response.data.ocs.data.sessionId
Expand Down Expand Up @@ -1123,6 +1126,10 @@ Signaling.Standalone.prototype.processRoomListEvent = function(data) {
switch (data.event.type) {
case 'disinvite':
if (data.event.disinvite.roomid === this.currentRoomToken) {
if (this._isRejoiningConversationWithNewSession) {
console.debug('Rejoining conversation with new session, "disinvite" message ignored')
return
}
console.error('User or session was removed from the conversation, redirecting')
EventBus.$emit('duplicateSessionDetected')
break
Expand Down