summary refs log tree commit diff
path: root/webclient/rooms
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-21 17:17:41 +0100
committerErik Johnston <erik@matrix.org>2014-08-21 17:17:41 +0100
commit7dac1bfc9148e4e23d388d8281aacee2bb41d5db (patch)
tree3e7f8f73f5a7b19aea6df017323a02f4303c5861 /webclient/rooms
parentChange IM sync api to also return the current presence list. (diff)
downloadsynapse-7dac1bfc9148e4e23d388d8281aacee2bb41d5db.tar.xz
Change webclient to always hit the im sync api before streaming so we get current presence state
Diffstat (limited to 'webclient/rooms')
-rw-r--r--webclient/rooms/rooms-controller.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/webclient/rooms/rooms-controller.js b/webclient/rooms/rooms-controller.js
index f2ff4a25ba..6bbb2b2ba1 100644
--- a/webclient/rooms/rooms-controller.js
+++ b/webclient/rooms/rooms-controller.js
@@ -93,11 +93,16 @@ angular.module('RoomsController', ['matrixService', 'mFileInput', 'mFileUpload',
         // List all rooms joined or been invited to
         matrixService.rooms().then(
             function(response) {
-                var data = assignRoomAliases(response.data);
+                var data = assignRoomAliases(response.data.rooms);
                 $scope.feedback = "Success";
                 for (var i=0; i<data.length; i++) {
                     $scope.rooms[data[i].room_id] = data[i];
                 }
+
+                var presence = response.data.presence;
+                for (var i = 0; i < presence.length; ++i) {
+                    eventHandlerService.handleEvent(presence[i], false);
+                }
             },
             function(error) {
                 $scope.feedback = "Failure: " + error.data;