feat(session): carry the bot service_language on the Session wire
Thread the Telegram bot's service language (en/ru) from the session mint response through the gateway into the FlatBuffers Session, so the UI knows which bot the player signed in through. handleTelegramAuth refreshes the account's service language onto the response before minting (it was set after the fetched copy). Empty for a non-Telegram login.
This commit is contained in:
@@ -171,6 +171,7 @@ describe('codec', () => {
|
||||
isGuest: true,
|
||||
displayName: 'Me',
|
||||
supportedLanguages: ['en', 'ru'],
|
||||
serviceLanguage: '',
|
||||
});
|
||||
});
|
||||
|
||||
@@ -311,7 +312,7 @@ describe('codec', () => {
|
||||
b.finish(fb.LinkResult.endLinkResult(b));
|
||||
const r = decodeLinkResult(b.asUint8Array());
|
||||
expect(r.status).toBe('merged');
|
||||
expect(r.session).toEqual({ token: 'tok-9', userId: 'a-1', isGuest: false, displayName: 'Kaya', supportedLanguages: [] });
|
||||
expect(r.session).toEqual({ token: 'tok-9', userId: 'a-1', isGuest: false, displayName: 'Kaya', supportedLanguages: [], serviceLanguage: '' });
|
||||
});
|
||||
|
||||
it('decodes an Invitation with inviter and invitees', () => {
|
||||
|
||||
Reference in New Issue
Block a user