summary refs log tree commit diff
path: root/webclient
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-28 15:56:16 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-28 16:23:30 +0200
commit06c79a23d481c45574915fe5ae7088f156e533b3 (patch)
treedb23d67d6917d4096284f74b4d310b0634fcead6 /webclient
parentCleaned up deps (diff)
downloadsynapse-06c79a23d481c45574915fe5ae7088f156e533b3.tar.xz
BF: Made member events parsing work (handleEvents expects an array of events)
Diffstat (limited to 'webclient')
-rw-r--r--webclient/components/matrix/event-stream-service.js12
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) {