BF: Made member events parsing work (handleEvents expects an array of events)

This commit is contained in:
Emmanuel ROHEE 2014-08-28 15:56:16 +02:00
parent 466fbe4c4e
commit 06c79a23d4

View File

@ -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) {