mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 15:05:05 -04:00
Parse /initialSync data and populate the new data structures.
This commit is contained in:
parent
2aa79f4fbe
commit
394f77c3ff
2 changed files with 33 additions and 4 deletions
|
@ -86,6 +86,18 @@ function(matrixService, $rootScope, $q, $timeout, mPresence, notificationService
|
|||
}
|
||||
$rootScope.events.rooms[room_id].membership = room.membership;
|
||||
}
|
||||
|
||||
// =========================================
|
||||
var __room = modelService.getRoom(room_id);
|
||||
if (room) { // /initialSync data
|
||||
__room.current_room_state.storeStateEvents(room.state);
|
||||
__room.current_room_state.pagination_token = room.messages.end;
|
||||
|
||||
__room.old_room_state.storeStateEvents(room.state);
|
||||
__room.old_room_state.pagination_token = room.messages.start;
|
||||
|
||||
__room.addMessages(room.messages.chunk);
|
||||
}
|
||||
};
|
||||
|
||||
var resetRoomMessages = function(room_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue