From 8bc39fa556d822ebba0a817f111e1e3b791fec95 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Fri, 9 Jan 2026 22:42:33 -0500 Subject: [PATCH] Reset trusted mute subscriptions on clear --- js/services/moderationService.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/js/services/moderationService.js b/js/services/moderationService.js index 559518d5..7bd23de9 100644 --- a/js/services/moderationService.js +++ b/js/services/moderationService.js @@ -817,12 +817,7 @@ export class ModerationService { } clearTrustedMuteTracking({ previousContacts = null } = {}) { - const previous = - previousContacts instanceof Set - ? new Set(previousContacts) - : this.trustedContacts instanceof Set - ? new Set(this.trustedContacts) - : new Set(); + void previousContacts; for (const [pubkey, entry] of this.trustedMuteSubscriptions.entries()) { if (entry && typeof entry.unsub === "function") { @@ -850,7 +845,8 @@ export class ModerationService { this.emit("trusted-mutes", { total: 0 }); - this.rebuildTrustedContacts(new Set(), { previous: new Set() }); + const emptyPrevious = new Set(); + this.rebuildTrustedContacts(new Set(), { previous: emptyPrevious }); } isTrustedMuteOwner(pubkey) {