diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 06ac3bb1..9e722029 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -1064,6 +1064,42 @@ export default class AccountViewView extends Vue { this.hideRegisterPromptOnNewContact = !!settings.hideRegisterPromptOnNewContact; this.isRegistered = !!settings?.isRegistered; + + // If settings show unregistered but user has activeDid, verify registration status + if (!this.isRegistered && this.activeDid) { + logger.debug("[AccountViewView] Settings show unregistered, verifying with server:", { + activeDid: this.activeDid, + apiServer: this.apiServer, + }); + + try { + const { fetchEndorserRateLimits } = await import("@/libs/endorserServer"); + const resp = await fetchEndorserRateLimits( + this.apiServer, + this.axios, + this.activeDid, + ); + + if (resp.status === 200) { + logger.debug("[AccountViewView] Server confirms user IS registered, updating settings:", { + activeDid: this.activeDid, + wasRegistered: false, + nowRegistered: true, + }); + + // Update settings and state + await this.$saveUserSettings(this.activeDid, { + isRegistered: true, + }); + this.isRegistered = true; + } + } catch (error) { + logger.debug("[AccountViewView] Registration check failed (expected for unregistered users):", { + activeDid: this.activeDid, + error: error instanceof Error ? error.message : String(error), + }); + } + } this.isSearchAreasSet = !!settings.searchBoxes; this.searchBox = settings.searchBoxes?.[0] || null; this.notifyingNewActivity = !!settings.notifyingNewActivityTime;