🐛(frontend) fall back to user.full_name on request-entry

Since the username refactoring, the username in the store could be
undefined when the join input was pre-filled from user.full_name,
because no keystroke was needed to populate the store.

This led to a 400 error on the request-entry endpoint whenever the
user joined without editing the pre-filled name.

Fall back to user.full_name when the store username is missing, so
the endpoint always receives a value.

Acknowledged as a somewhat wobbly fix, but ships as-is until the
underlying flow is reworked.
This commit is contained in:
lebaudantoine
2026-07-28 14:24:35 +02:00
parent 4a0a106d91
commit 72ae320c6c
@@ -316,7 +316,7 @@ export const Join = ({
refetch: refetchRoom,
} = useQuery({
queryKey: [keys.room, roomId],
queryFn: () => fetchRoom({ roomId, username }),
queryFn: () => fetchRoom({ roomId, username: username || user?.full_name }),
staleTime: 6 * 60 * 60 * 1000, // By default, LiveKit access tokens expire 6 hours after generation
retry: false,
enabled: false,
@@ -339,7 +339,7 @@ export const Join = ({
const { status, startWaiting } = useLobby({
roomId,
username,
username: username || user?.full_name,
onAccepted: handleAccepted,
})