From 3d499857cea2723168a7b593e3dc8c3817d73884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Fri, 7 Jun 2019 12:06:48 +0200 Subject: [PATCH] Sync and set active room when joined only in Application MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "syncAndSetActiveRoom" in Embedded only synchronized the rooms after joining a room, but that is already done in PublicShareAuth and the Files plugin (followed by some specific code for each case once the synchronization is done). Due to this calling "syncAndSetActiveRoom" after joining a room is only needed in Application. Signed-off-by: Daniel Calviño Sánchez --- js/app.js | 2 ++ js/connection.js | 6 ------ js/embedded.js | 4 ---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/js/app.js b/js/app.js index acf206e71..c530e64ab 100644 --- a/js/app.js +++ b/js/app.js @@ -618,6 +618,8 @@ return; } + this.syncAndSetActiveRoom(token); + this.inRoom = true; if (this.pendingNickChange) { this.setGuestName(this.pendingNickChange); diff --git a/js/connection.js b/js/connection.js index 6134ff528..400a2b34d 100644 --- a/js/connection.js +++ b/js/connection.js @@ -19,12 +19,6 @@ selectParticipants.removeClass('error'); }); - this.app.signaling.on('joinRoom', function(joinedToken) { - if (joinedToken === this.app.token) { - this.app.syncAndSetActiveRoom(joinedToken); - } - }.bind(this)); - this.app.signaling.on('roomChanged', function() { this.leaveCurrentRoom(); }.bind(this)); diff --git a/js/embedded.js b/js/embedded.js index 434abc8cb..47056b095 100644 --- a/js/embedded.js +++ b/js/embedded.js @@ -64,10 +64,6 @@ }); }, - syncAndSetActiveRoom: function(token) { - this.signaling.syncRooms(); - }, - initialize: function() { if (!OC.getCurrentUser().uid) { this.initGuestName();