fix(voice): align local user homeUserId fallback with null contract

The isLocal branch was falling through to cachedUser.id when
homeUserId was null, diverging from the null-for-home-instance
contract used by the memberMatch and carry-forward branches.
Avatar.tsx already falls back to user.id internally.
This commit is contained in:
Jannis Braun
2026-03-24 21:01:37 +01:00
parent 8910de3053
commit 1ca5ca3132
+1 -1
View File
@@ -196,7 +196,7 @@ export function useLiveKit() {
} else if (isLocal) {
// Local user safety net — authStore is always available
cachedUser = useAuthStore.getState().user;
homeUserId = cachedUser?.homeUserId ?? cachedUser?.id ?? null;
homeUserId = cachedUser?.homeUserId ?? null;
} else {
// Space switched — carry forward from previous cycle
cachedUser = prevCacheMap.get(p.identity) ?? null;