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:
@@ -196,7 +196,7 @@ export function useLiveKit() {
|
|||||||
} else if (isLocal) {
|
} else if (isLocal) {
|
||||||
// Local user safety net — authStore is always available
|
// Local user safety net — authStore is always available
|
||||||
cachedUser = useAuthStore.getState().user;
|
cachedUser = useAuthStore.getState().user;
|
||||||
homeUserId = cachedUser?.homeUserId ?? cachedUser?.id ?? null;
|
homeUserId = cachedUser?.homeUserId ?? null;
|
||||||
} else {
|
} else {
|
||||||
// Space switched — carry forward from previous cycle
|
// Space switched — carry forward from previous cycle
|
||||||
cachedUser = prevCacheMap.get(p.identity) ?? null;
|
cachedUser = prevCacheMap.get(p.identity) ?? null;
|
||||||
|
|||||||
Reference in New Issue
Block a user