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
+6
View File
@@ -224,6 +224,12 @@ table Profile {
// variant_preferences is the set of game variants the player allows themselves to be
// matched into (engine.Variant labels), Erudit-first; the New Game picker is gated by it.
variant_preferences:[string];
// email is the account's confirmed email address ("" when none); telegram_linked and
// vk_linked report whether a platform identity is attached. They drive the profile's
// link / unlink / change-email controls (all added trailing — backward-compatible).
email:string;
telegram_linked:bool;
vk_linked:bool;
}
// BlockStatus reports the caller's current manual block. The UI fetches it after any operation
+42 -1
View File
@@ -179,8 +179,40 @@ func (rcv *Profile) VariantPreferencesLength() int {
return 0
}
func (rcv *Profile) Email() []byte {
o := flatbuffers.UOffsetT(rcv._tab.Offset(30))
if o != 0 {
return rcv._tab.ByteVector(o + rcv._tab.Pos)
}
return nil
}
func (rcv *Profile) TelegramLinked() bool {
o := flatbuffers.UOffsetT(rcv._tab.Offset(32))
if o != 0 {
return rcv._tab.GetBool(o + rcv._tab.Pos)
}
return false
}
func (rcv *Profile) MutateTelegramLinked(n bool) bool {
return rcv._tab.MutateBoolSlot(32, n)
}
func (rcv *Profile) VkLinked() bool {
o := flatbuffers.UOffsetT(rcv._tab.Offset(34))
if o != 0 {
return rcv._tab.GetBool(o + rcv._tab.Pos)
}
return false
}
func (rcv *Profile) MutateVkLinked(n bool) bool {
return rcv._tab.MutateBoolSlot(34, n)
}
func ProfileStart(builder *flatbuffers.Builder) {
builder.StartObject(13)
builder.StartObject(16)
}
func ProfileAddUserId(builder *flatbuffers.Builder, userId flatbuffers.UOffsetT) {
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(userId), 0)
@@ -224,6 +256,15 @@ func ProfileAddVariantPreferences(builder *flatbuffers.Builder, variantPreferenc
func ProfileStartVariantPreferencesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
return builder.StartVector(4, numElems, 4)
}
func ProfileAddEmail(builder *flatbuffers.Builder, email flatbuffers.UOffsetT) {
builder.PrependUOffsetTSlot(13, flatbuffers.UOffsetT(email), 0)
}
func ProfileAddTelegramLinked(builder *flatbuffers.Builder, telegramLinked bool) {
builder.PrependBoolSlot(14, telegramLinked, false)
}
func ProfileAddVkLinked(builder *flatbuffers.Builder, vkLinked bool) {
builder.PrependBoolSlot(15, vkLinked, false)
}
func ProfileEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
return builder.EndObject()
}