From 9d5c66ace009ea254219cc7e54e345be8d80486c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 14 Dec 2021 17:35:56 +0100 Subject: Don't reload the room list if only the participants changed Signed-off-by: Joas Schilling --- src/utils/signaling.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/utils/signaling.js') diff --git a/src/utils/signaling.js b/src/utils/signaling.js index 8efa849b4..382c0d25f 100644 --- a/src/utils/signaling.js +++ b/src/utils/signaling.js @@ -1219,8 +1219,19 @@ Signaling.Standalone.prototype.processRoomMessageEvent = function(data) { Signaling.Standalone.prototype.processRoomListEvent = function(data) { switch (data.event.type) { + case 'update': + if (data.event.update.properties['participant-list']) { + console.debug('Room list event for participant list', data) + if (data.event.update.roomid === this.currentRoomToken) { + this._trigger('participantListChanged') + } else { + // Participant list in another room changed, we don't really care + } + break + } + // eslint-disable-next-line no-fallthrough case 'disinvite': - if (data.event.disinvite.roomid === this.currentRoomToken) { + if (data.event?.disinvite?.roomid === this.currentRoomToken) { if (this._isRejoiningConversationWithNewSession) { console.debug('Rejoining conversation with new session, "disinvite" message ignored') return -- cgit v1.2.3