Merge pull request #343 from vector-im/bwindels/fix-sync-rooms-section-missing

Dont assume there is a rooms section in the sync
This commit is contained in:
Bruno Windels 2021-05-06 10:11:32 +00:00 committed by GitHub
commit 57725e745e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -375,7 +375,7 @@ export class Sync {
_parseInvites(roomsSection) {
const inviteStates = [];
if (roomsSection.invite) {
if (roomsSection?.invite) {
for (const [roomId, roomResponse] of Object.entries(roomsSection.invite)) {
let invite = this._session.invites.get(roomId);
let isNewInvite = false;