summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-21 17:55:41 +0100
committerErik Johnston <erik@matrix.org>2014-08-21 17:55:41 +0100
commit2e1ab9db08e3fe41822a65fdf38feafbd22173b6 (patch)
tree07d304a6cfd661c9c449e69da97101e47e3a8e55 /webclient/components
parentAdd ts field to all events. (diff)
downloadsynapse-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.js10
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);