mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 17:24:59 -04:00
Reinitialize room when creating a RoomController so that we start off with a clean slate, as it expects/
This commit is contained in:
parent
dde50d4245
commit
74c90f7815
2 changed files with 13 additions and 1 deletions
|
@ -44,6 +44,12 @@ angular.module('eventHandlerService', [])
|
|||
$rootScope.events.rooms[room_id].members = {};
|
||||
}
|
||||
}
|
||||
|
||||
var reInitRoom = function(room_id) {
|
||||
$rootScope.events.rooms[room_id] = {};
|
||||
$rootScope.events.rooms[room_id].messages = [];
|
||||
$rootScope.events.rooms[room_id].members = {};
|
||||
}
|
||||
|
||||
var handleMessage = function(event, isLiveEvent) {
|
||||
if ("membership_target" in event.content) {
|
||||
|
@ -118,6 +124,10 @@ angular.module('eventHandlerService', [])
|
|||
for (var i=0; i<events.length; i++) {
|
||||
this.handleEvent(events[i], isLiveEvents);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
reInitRoom: function(room_id) {
|
||||
reInitRoom(room_id);
|
||||
},
|
||||
};
|
||||
}]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue