Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Override hide redaction preference for thread root (#7546)
Browse files Browse the repository at this point in the history
  • Loading branch information
Germain committed Jan 14, 2022
1 parent 7ccbf81 commit 52dd590
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/shouldHideEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 52dd590

Please sign in to comment.