mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-29 08:52:25 +00:00
Merge pull request #1058 from PR0M3TH3AN/codex/update-auth/logout-flow-for-activeprofilepubkey
Reset moderation settings on logout
This commit is contained in:
1 file changed
+10
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user