diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-21 17:55:41 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-21 17:55:41 +0100 |
commit | 2e1ab9db08e3fe41822a65fdf38feafbd22173b6 (patch) | |
tree | 07d304a6cfd661c9c449e69da97101e47e3a8e55 /webclient/components | |
parent | Add ts field to all events. (diff) | |
download | synapse-2e1ab9db08e3fe41822a65fdf38feafbd22173b6.tar.xz |
Only start event streaming after having set up the controllers.
Diffstat (limited to 'webclient/components')
-rw-r--r-- | webclient/components/matrix/event-stream-service.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/webclient/components/matrix/event-stream-service.js b/webclient/components/matrix/event-stream-service.js index 9a8f6eac4c..a1a98b2a36 100644 --- a/webclient/components/matrix/event-stream-service.js +++ b/webclient/components/matrix/event-stream-service.js @@ -106,6 +106,16 @@ angular.module('eventStreamService', []) // FIXME: We are discarding all the messages. matrixService.rooms().then( function(response) { + var rooms = response.data.rooms; + for (var i = 0; i < rooms.length; ++i) { + var room = rooms[i]; + if ("state" in room) { + for (var j = 0; j < room.state.length; ++j) { + eventHandlerService.handleEvents(room.state[j], false); + } + } + } + var presence = response.data.presence; for (var i = 0; i < presence.length; ++i) { eventHandlerService.handleEvent(presence[i], false); |