Widget receives updated state events if user is re-invited into the room.

This commit is contained in:
mikhail.aheichyk 2022-12-20 11:01:14 +03:00
parent 910aa0b813
commit 71d06b4d59
3 changed files with 216 additions and 1 deletions

View file

@ -520,7 +520,13 @@ export class StopGapWidget extends EventEmitter {
}
}
this.readUpToMap[ev.getRoomId()] = ev.getId();
// Skip marker assignment if membership is 'invite', otherwise 'm.room.member' from
// invitation room will assign it and new state events will be not forwarded to the widget
// because of empty timeline for invitation room and assigned marker.
const room = this.client.getRoom(ev.getRoomId());
if (room && room.getMyMembership() !== 'invite') {
this.readUpToMap[ev.getRoomId()] = ev.getId();
}
const raw = ev.getEffectiveEvent();
this.messaging.feedEvent(raw as IRoomEvent, this.eventListenerRoomId).catch((e) => {