mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 16:44:49 -04:00
Keep track of people's presence and query that when we update the members list.
This commit is contained in:
parent
74c90f7815
commit
6118a102c1
2 changed files with 10 additions and 3 deletions
|
@ -35,6 +35,8 @@ angular.module('eventHandlerService', [])
|
|||
$rootScope.events = {
|
||||
rooms: {}, // will contain roomId: { messages:[], members:{userid1: event} }
|
||||
};
|
||||
|
||||
$rootScope.presence = {};
|
||||
|
||||
var initRoom = function(room_id) {
|
||||
if (!(room_id in $rootScope.events.rooms)) {
|
||||
|
@ -91,6 +93,7 @@ angular.module('eventHandlerService', [])
|
|||
};
|
||||
|
||||
var handlePresence = function(event, isLiveEvent) {
|
||||
$rootScope.presence[event.content.user_id] = event;
|
||||
$rootScope.$broadcast(PRESENCE_EVENT, event, isLiveEvent);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue