Override hide redaction preference for thread root (#7546)

pull/21833/head
Germain 2022-01-14 14:41:40 +00:00 committed by GitHub
parent 7ccbf814df
commit 52dd590b49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -62,7 +62,9 @@ export default function shouldHideEvent(ev: MatrixEvent, ctx?: IRoomState): bool
name => SettingsStore.getValue(name, ev.getRoomId());
// Hide redacted events
if (ev.isRedacted() && !isEnabled('showRedactions')) return true;
// Deleted events with a thread are always shown regardless of user preference
// to make sure that a thread can be accessible even if the root message is deleted
if (ev.isRedacted() && !isEnabled('showRedactions') && !ev.getThread()) return true;
// Hide replacement events since they update the original tile (if enabled)
if (ev.isRelation("m.replace")) return true;