Fixed empty display name (content.displayname in a room member can be null)

This commit is contained in:
Emmanuel ROHEE 2014-09-05 15:50:44 +02:00
parent e2ae8af072
commit f286a4fcd4

View File

@ -26,6 +26,9 @@ Typically, this service will store events or broadcast them to any listeners
(e.g. controllers) via $broadcast. Alternatively, it may update the $rootScope
if typically all the $on method would do is update its own $scope.
*/
var toto;
angular.module('eventHandlerService', [])
.factory('eventHandlerService', ['matrixService', '$rootScope', '$q', function(matrixService, $rootScope, $q) {
var ROOM_CREATE_EVENT = "ROOM_CREATE_EVENT";
@ -38,6 +41,9 @@ angular.module('eventHandlerService', [])
var InitialSyncDeferred = $q.defer();
toto = $rootScope;
$rootScope.events = {
rooms: {} // will contain roomId: { messages:[], members:{userid1: event} }
};