mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-07 17:35:00 -04:00
Remove rootScope.presence and replaced with modelService.getUser/setUser.
This commit is contained in:
parent
afd2e214bc
commit
3916e23bbd
3 changed files with 23 additions and 13 deletions
|
@ -153,6 +153,10 @@ angular.module('modelService', [])
|
|||
// roomid: <Room>
|
||||
};
|
||||
|
||||
var users = {
|
||||
// user_id: <User>
|
||||
};
|
||||
|
||||
console.log("Models inited.");
|
||||
|
||||
return {
|
||||
|
@ -194,6 +198,16 @@ angular.module('modelService', [])
|
|||
//console.log("looking for roomId for " + alias + "; found: " + roomId);
|
||||
return roomId;
|
||||
},
|
||||
|
||||
getUser: function(user_id) {
|
||||
return users[user_id];
|
||||
},
|
||||
|
||||
setUser: function(event) {
|
||||
var usr = new User();
|
||||
usr.event = event;
|
||||
users[event.content.user_id] = usr;
|
||||
}
|
||||
|
||||
};
|
||||
}]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue