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:
@@ -76,6 +76,7 @@ func encodeProfile(p backendclient.ProfileResp) []byte {
|
||||
tz := b.CreateString(p.TimeZone)
|
||||
awayStart := b.CreateString(p.AwayStart)
|
||||
awayEnd := b.CreateString(p.AwayEnd)
|
||||
email := b.CreateString(p.Email)
|
||||
// Build the banner table (and its children) before opening Profile: FlatBuffers
|
||||
// forbids a nested table while another is under construction.
|
||||
var banner flatbuffers.UOffsetT
|
||||
@@ -96,6 +97,9 @@ func encodeProfile(p backendclient.ProfileResp) []byte {
|
||||
fb.ProfileAddAwayEnd(b, awayEnd)
|
||||
fb.ProfileAddNotificationsInAppOnly(b, p.NotificationsInAppOnly)
|
||||
fb.ProfileAddVariantPreferences(b, prefs)
|
||||
fb.ProfileAddEmail(b, email)
|
||||
fb.ProfileAddTelegramLinked(b, p.TelegramLinked)
|
||||
fb.ProfileAddVkLinked(b, p.VkLinked)
|
||||
if p.Banner != nil {
|
||||
fb.ProfileAddBanner(b, banner)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user