From 7fa65796f085b98524b1f2ad509a6822784a2586 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Sat, 9 May 2026 13:21:13 +0200 Subject: [PATCH] fix: show account identity in switcher header instead of sending alias --- components/layout/account-switcher.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/components/layout/account-switcher.tsx b/components/layout/account-switcher.tsx index 095c4640..48df8979 100644 --- a/components/layout/account-switcher.tsx +++ b/components/layout/account-switcher.tsx @@ -49,7 +49,6 @@ export function AccountSwitcher({ variant = "rail", className }: AccountSwitcher const switchAccount = useAuthStore((s) => s.switchAccount); const logout = useAuthStore((s) => s.logout); const logoutAll = useAuthStore((s) => s.logoutAll); - const primaryIdentity = useAuthStore((s) => s.primaryIdentity); const updatePosition = useCallback(() => { if (!buttonRef.current) return; @@ -115,9 +114,11 @@ export function AccountSwitcher({ variant = "rail", className }: AccountSwitcher setDefaultAccount(accountId); }; - // Display name for the active account - const displayName = primaryIdentity?.name || activeAccount?.displayName || activeAccount?.label || ""; - const displayEmail = primaryIdentity?.email || activeAccount?.email || activeAccount?.username || ""; + // Show the account's own identity, not the preferred sending identity — + // primaryIdentity can be an alias (e.g. info@korazo.net) that differs from + // the actually logged-in account (info@linusrath.de). + const displayName = activeAccount?.displayName || activeAccount?.label || ""; + const displayEmail = activeAccount?.email || activeAccount?.username || ""; return ( <>