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:
commit
7af4891cb7
2 changed files with 232 additions and 1 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue