Name the run's owner on session.start (#362)

Adds `userId` (the box owner) to `session.start` so a host knows whose
Steam sign-in plays the run. API tests: 161 pass.
This commit is contained in:
Wanjohi
2026-10-07 15:43:25 +00:00
committed by GitHub
parent 27dc33f9ab
commit 5bf520c464
2 changed files with 9 additions and 2 deletions
+2 -1
View File
@@ -428,7 +428,8 @@ describe('GET /machine/jobs', () => {
boxTier: 'sm',
gameId: s.gameId,
steamAppId: 5520,
linkedAccountId: s.owner.linkedAccountId
linkedAccountId: s.owner.linkedAccountId,
userId: s.owner.userId
});
});
+7 -1
View File
@@ -336,6 +336,11 @@ export namespace Session {
linkedAccountId: z.string().meta({
description: 'Which linked account is playing',
example: Examples.Session.linkedAccountId
}),
userId: z.string().meta({
description:
'Whose run it is: the box owner, whose Steam sign-in on this host plays it',
example: Examples.User.id
})
})
.meta({
@@ -413,7 +418,8 @@ export namespace Session {
boxTier: row.box.tier as z.infer<typeof StartJob>['boxTier'],
gameId: row.game.id,
steamAppId: row.game.steamAppId,
linkedAccountId: row.session.linkedAccountId
linkedAccountId: row.session.linkedAccountId,
userId: row.box.userId
})
)
);