diff options
author | Emmanuel ROHEE <erohee@amdocs.com> | 2014-08-28 15:56:16 +0200 |
---|---|---|
committer | Emmanuel ROHEE <erohee@amdocs.com> | 2014-08-28 16:23:30 +0200 |
commit | 06c79a23d481c45574915fe5ae7088f156e533b3 (patch) | |
tree | db23d67d6917d4096284f74b4d310b0634fcead6 | |
parent | Cleaned up deps (diff) | |
download | synapse-06c79a23d481c45574915fe5ae7088f156e533b3.tar.xz |
BF: Made member events parsing work (handleEvents expects an array of events)
-rw-r--r-- | webclient/components/matrix/event-stream-service.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/webclient/components/matrix/event-stream-service.js b/webclient/components/matrix/event-stream-service.js index a1a98b2a36..dc2e359dd0 100644 --- a/webclient/components/matrix/event-stream-service.js +++ b/webclient/components/matrix/event-stream-service.js @@ -96,7 +96,7 @@ angular.module('eventStreamService', []) ); return deferred.promise; - } + }; var startEventStream = function() { settings.shouldPoll = true; @@ -110,18 +110,14 @@ angular.module('eventStreamService', []) 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); - } + eventHandlerService.handleEvents(room.state, false); } } var presence = response.data.presence; - for (var i = 0; i < presence.length; ++i) { - eventHandlerService.handleEvent(presence[i], false); - } + eventHandlerService.handleEvents(presence, false); - settings.from = response.data.end + settings.from = response.data.end; doEventStream(deferred); }, function(error) { |