Skip to content

Commit 03e4e80

Browse files
committed
fix(remote-control): detect mobile requests by absence of userId instead of source flag
1 parent 80f1f25 commit 03e4e80

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/web/app/(app)/api/chat/route.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export async function POST(req: Request) {
4545
source?: string
4646
} = await req.json()
4747

48-
const isRemoteControl = source === 'remote-control'
48+
// Mobile (remote-control) requests never include userId — they only send projectId + messages
49+
const isRemoteControl = !bodyUserId
4950

5051
// If userId not provided (mobile app), look it up from the project
5152
let userId = bodyUserId

0 commit comments

Comments
 (0)