You've already forked matrix-js-sdk
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:
@@ -1441,13 +1441,6 @@ export class Room extends EventEmitter {
|
|||||||
// (in the sender and target fields). We should get those
|
// (in the sender and target fields). We should get those
|
||||||
// RoomMember objects to update themselves when the events that
|
// RoomMember objects to update themselves when the events that
|
||||||
// they are based on are changed.
|
// 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.
|
// Remove any visibility change on this event.
|
||||||
this.visibilityEvents.delete(redactId);
|
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.
|
// Implement MSC3531: hiding messages.
|
||||||
if (event.isVisibilityEvent()) {
|
if (event.isVisibilityEvent()) {
|
||||||
// This event changes the visibility of another event, record
|
// This event changes the visibility of another event, record
|
||||||
|
|||||||
Reference in New Issue
Block a user