feat(profile): carry linked identities in the profile (email, telegram, vk)

Add email / telegram_linked / vk_linked to the Profile (fbs table + regenerated
Go/TS bindings, gateway ProfileResp + encodeProfile, backend DTO, UI model +
decode). They are filled outside the pure projection — Server.profileResponse now
reads the account's identities (like the banner seam) — and will drive the profile's
Add / Unlink / change-email controls.
This commit is contained in:
Ilia Denisov
2026-07-03 09:17:17 +02:00
parent 76e7916ff6
commit 3a823ca7ef
10 changed files with 130 additions and 2 deletions
+3
View File
@@ -354,6 +354,9 @@ export function decodeProfile(buf: Uint8Array): Profile {
notificationsInAppOnly: p.notificationsInAppOnly(),
variantPreferences: decodeVariantPreferences(p),
banner: decodeBanner(p),
email: s(p.email()),
telegramLinked: p.telegramLinked(),
vkLinked: p.vkLinked(),
};
}
+3
View File
@@ -39,6 +39,9 @@ export const PROFILE: Profile = {
notificationsInAppOnly: true,
// Every variant enabled, so the mock-driven UI offers the full New Game picker.
variantPreferences: ['erudit_ru', 'scrabble_ru', 'scrabble_en'],
email: 'you@example.com',
telegramLinked: false,
vkLinked: false,
};
// Seed social/account data for the mock (pnpm start + Playwright). The mock profile
+5
View File
@@ -156,6 +156,11 @@ export interface Profile {
variantPreferences: Variant[];
/** The advertising-banner block, present only for a viewer eligible to see it. */
banner?: Banner;
/** The account's confirmed email address ("" when none). */
email: string;
/** Whether a Telegram / VK identity is attached — drives the Add / Unlink controls. */
telegramLinked: boolean;
vkLinked: boolean;
}
/** Banner is the advertising-banner block of an eligible viewer's profile. */