Merge pull request #1058 from PR0M3TH3AN/codex/update-auth/logout-flow-for-activeprofilepubkey

Reset moderation settings on logout
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-01-02 12:51:22 -05:00
commit f4ef1a474b
1 file changed
+10
+10
View File
@@ -20,6 +20,7 @@ import {
persistProfileCacheToStorage as persistProfileCacheState,
getProfileCacheEntry as getCachedProfileEntry,
setProfileCacheEntry as setCachedProfileEntry,
resetModerationSettings,
} from "../state/cache.js";
import getDefaultAuthProvider, {
providers as defaultAuthProviders,
@@ -742,6 +743,15 @@ export default class AuthService {
setCurrentUserNpub(null);
setActiveProfilePubkey(null, { persist: true });
try {
resetModerationSettings({ persist: true });
} catch (error) {
this.log(
"[AuthService] Failed to reset moderation settings on logout",
error,
);
}
if (this.userBlocks && typeof this.userBlocks.reset === "function") {
try {
this.userBlocks.reset();