1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

[Fix] Nullcheck redactedEvent (#2103)

We should only check whether a redacted event is a visibility event *if the redacted event is not null*.
This commit is contained in:
David Teller
2022-01-12 13:27:03 +01:00
committed by GitHub
parent 96d1b30012
commit 4acb98c496

View File

@@ -1441,13 +1441,6 @@ export class Room extends EventEmitter {
// (in the sender and target fields). We should get those
// RoomMember objects to update themselves when the events that
// they are based on are changed.
}
// FIXME: apply redactions to notification list
// NB: We continue to add the redaction event to the timeline so
// clients can say "so and so redacted an event" if they wish to. Also
// this may be needed to trigger an update.
// Remove any visibility change on this event.
this.visibilityEvents.delete(redactId);
@@ -1459,6 +1452,13 @@ export class Room extends EventEmitter {
}
}
// FIXME: apply redactions to notification list
// NB: We continue to add the redaction event to the timeline so
// clients can say "so and so redacted an event" if they wish to. Also
// this may be needed to trigger an update.
}
// Implement MSC3531: hiding messages.
if (event.isVisibilityEvent()) {
// This event changes the visibility of another event, record