mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-27 03:58:30 +00:00
Regenerate room lists on Room event
To make sure that we handle rooms that our client has not seen previously, we regenerate the room list when the room is stored - which is indicated by the js-sdk by the Room event.
This commit is contained in:
@@ -97,6 +97,14 @@ class RoomListStore extends Store {
|
||||
this._generateRoomLists();
|
||||
}
|
||||
break;
|
||||
// This could be a new room that we've been invited to, joined or created
|
||||
// we won't get a RoomMember.membership for these cases if we're not already
|
||||
// a member.
|
||||
case 'MatrixActions.Room': {
|
||||
if (!this._state.ready || !this._matrixClient.credentials.userId) break;
|
||||
this._generateRoomLists();
|
||||
}
|
||||
break;
|
||||
case 'RoomListActions.tagRoom.pending': {
|
||||
// XXX: we only show one optimistic update at any one time.
|
||||
// Ideally we should be making a list of in-flight requests
|
||||
|
||||
Reference in New Issue
Block a user