diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-21 17:17:41 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-21 17:17:41 +0100 |
commit | 7dac1bfc9148e4e23d388d8281aacee2bb41d5db (patch) | |
tree | 3e7f8f73f5a7b19aea6df017323a02f4303c5861 /webclient/rooms/rooms-controller.js | |
parent | Change IM sync api to also return the current presence list. (diff) | |
download | synapse-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/rooms-controller.js')
-rw-r--r-- | webclient/rooms/rooms-controller.js | 7 |
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; |