diff --git a/apps/api/test/session.test.ts b/apps/api/test/session.test.ts index 6d9bc5bd..21c10987 100644 --- a/apps/api/test/session.test.ts +++ b/apps/api/test/session.test.ts @@ -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 }); }); diff --git a/packages/core/src/session/index.ts b/packages/core/src/session/index.ts index 76cdf1c7..b43ded13 100644 --- a/packages/core/src/session/index.ts +++ b/packages/core/src/session/index.ts @@ -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['boxTier'], gameId: row.game.id, steamAppId: row.game.steamAppId, - linkedAccountId: row.session.linkedAccountId + linkedAccountId: row.session.linkedAccountId, + userId: row.box.userId }) ) );