Merge pull request #9802 from nordeck/widget_state_no_update_invitation_room

State event updates are not forwarded to the widget from invitation room
This commit is contained in:
Andy Balaam
2023-01-16 15:33:25 +00:00
committed by GitHub
2 changed files with 232 additions and 1 deletions
+11 -1
View File
@@ -519,7 +519,17 @@ 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 evRoomId = ev.getRoomId();
const evId = ev.getId();
if (evRoomId && evId) {
const room = this.client.getRoom(evRoomId);
if (room && room.getMyMembership() === "join") {
this.readUpToMap[evRoomId] = evId;
}
}
const raw = ev.getEffectiveEvent();
this.messaging.feedEvent(raw as IRoomEvent, this.eventListenerRoomId).catch((e) => {