mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-29 08:52:25 +00:00
Merge pull request #1167 from PR0M3TH3AN/codex/update-cleartrustedmutetracking-logic
Force rebuild of trusted contacts to trigger re-subscribe after clear
This commit is contained in:
1 file changed
+3
-7
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user