57c778f9b2
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 13s
CI / ui (pull_request) Successful in 54s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 57s
Collapse the two per-language Telegram bots into one unified bot and
replace language-based variant gating with explicit per-user variant
preferences.
- Telegram: one bot; drop service_language and the supported_languages
set everywhere (DB, account, auth, FlatBuffers Session wire, gateway,
connector proto). The single bot renders chat and out-of-app push in
the recipient's preferred_language; remove the game-language push
routing override (notify Intent.Language / push Event.language).
- Preferences: new accounts.variant_preferences (text[], DB default
{erudit_ru}, CHECK non-empty + subset of the three variants). Gates
the New Game picker, vs-AI and the friend invitation the player
creates, enforced server-side (HTTP 400 otherwise); an invited friend
may still accept any variant. Edited on the Settings screen; variants
are Erudit-first everywhere.
- Admin: drop the per-bot language selectors (broadcast / send-to-user)
and the feedback channel_lang column/field.
- Env/CI: collapse TELEGRAM_BOT_TOKEN_{EN,RU}, TELEGRAM_GAME_CHANNEL_ID_{EN,RU},
VITE_TELEGRAM_LINK{,_EN,_RU} and VITE_TELEGRAM_GAME_CHANNEL_NAME_{EN,RU}
to single unsuffixed names; drop GATEWAY_DEFAULT_SUPPORTED_LANGUAGES.
- Docs updated (ARCHITECTURE, FUNCTIONAL + _ru, platform/telegram, gateway,
backend, ui, UI_DESIGN, PRERELEASE).
The migration squash is deferred to a follow-up PR.
215 lines
6.8 KiB
Go
215 lines
6.8 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc (unknown)
|
|
// source: push/v1/push.proto
|
|
|
|
// Package scrabble.push.v1 is the backend -> gateway live-event control channel.
|
|
// The gateway opens Subscribe once at startup and keeps the stream open; the
|
|
// backend pushes one Event per notification intent. The payload is an opaque
|
|
// FlatBuffers message (the scrabblefb.* tables) that the gateway forwards to the
|
|
// client without re-interpreting it. The transport is plain gRPC server-stream
|
|
// (ARCHITECTURE.md §2); the client edge is Connect-RPC (gateway/proto/edge).
|
|
|
|
package pushv1
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// SubscribeRequest opens a push subscription. gateway_id identifies the gateway
|
|
// instance for logging; the MVP backend keeps no per-gateway state.
|
|
type SubscribeRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
GatewayId string `protobuf:"bytes,1,opt,name=gateway_id,json=gatewayId,proto3" json:"gateway_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SubscribeRequest) Reset() {
|
|
*x = SubscribeRequest{}
|
|
mi := &file_push_v1_push_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SubscribeRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SubscribeRequest) ProtoMessage() {}
|
|
|
|
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_push_v1_push_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
|
|
func (*SubscribeRequest) Descriptor() ([]byte, []int) {
|
|
return file_push_v1_push_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *SubscribeRequest) GetGatewayId() string {
|
|
if x != nil {
|
|
return x.GatewayId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Event is one live-event frame. kind is the notification catalog kind
|
|
// (your_turn, opponent_moved, chat_message, nudge, match_found). payload is the
|
|
// FlatBuffers-encoded body for that kind. event_id is a correlation id the
|
|
// gateway carries through to the client envelope.
|
|
type Event struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
|
|
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
|
|
EventId string `protobuf:"bytes,4,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Event) Reset() {
|
|
*x = Event{}
|
|
mi := &file_push_v1_push_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Event) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Event) ProtoMessage() {}
|
|
|
|
func (x *Event) ProtoReflect() protoreflect.Message {
|
|
mi := &file_push_v1_push_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Event.ProtoReflect.Descriptor instead.
|
|
func (*Event) Descriptor() ([]byte, []int) {
|
|
return file_push_v1_push_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *Event) GetUserId() string {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Event) GetKind() string {
|
|
if x != nil {
|
|
return x.Kind
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Event) GetPayload() []byte {
|
|
if x != nil {
|
|
return x.Payload
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Event) GetEventId() string {
|
|
if x != nil {
|
|
return x.EventId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_push_v1_push_proto protoreflect.FileDescriptor
|
|
|
|
const file_push_v1_push_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x12push/v1/push.proto\x12\x10scrabble.push.v1\"1\n" +
|
|
"\x10SubscribeRequest\x12\x1d\n" +
|
|
"\n" +
|
|
"gateway_id\x18\x01 \x01(\tR\tgatewayId\"i\n" +
|
|
"\x05Event\x12\x17\n" +
|
|
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x12\n" +
|
|
"\x04kind\x18\x02 \x01(\tR\x04kind\x12\x18\n" +
|
|
"\apayload\x18\x03 \x01(\fR\apayload\x12\x19\n" +
|
|
"\bevent_id\x18\x04 \x01(\tR\aeventId2R\n" +
|
|
"\x04Push\x12J\n" +
|
|
"\tSubscribe\x12\".scrabble.push.v1.SubscribeRequest\x1a\x17.scrabble.push.v1.Event0\x01B#Z!scrabble/pkg/proto/push/v1;pushv1b\x06proto3"
|
|
|
|
var (
|
|
file_push_v1_push_proto_rawDescOnce sync.Once
|
|
file_push_v1_push_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_push_v1_push_proto_rawDescGZIP() []byte {
|
|
file_push_v1_push_proto_rawDescOnce.Do(func() {
|
|
file_push_v1_push_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_push_v1_push_proto_rawDesc), len(file_push_v1_push_proto_rawDesc)))
|
|
})
|
|
return file_push_v1_push_proto_rawDescData
|
|
}
|
|
|
|
var file_push_v1_push_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
var file_push_v1_push_proto_goTypes = []any{
|
|
(*SubscribeRequest)(nil), // 0: scrabble.push.v1.SubscribeRequest
|
|
(*Event)(nil), // 1: scrabble.push.v1.Event
|
|
}
|
|
var file_push_v1_push_proto_depIdxs = []int32{
|
|
0, // 0: scrabble.push.v1.Push.Subscribe:input_type -> scrabble.push.v1.SubscribeRequest
|
|
1, // 1: scrabble.push.v1.Push.Subscribe:output_type -> scrabble.push.v1.Event
|
|
1, // [1:2] is the sub-list for method output_type
|
|
0, // [0:1] is the sub-list for method input_type
|
|
0, // [0:0] is the sub-list for extension type_name
|
|
0, // [0:0] is the sub-list for extension extendee
|
|
0, // [0:0] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_push_v1_push_proto_init() }
|
|
func file_push_v1_push_proto_init() {
|
|
if File_push_v1_push_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_push_v1_push_proto_rawDesc), len(file_push_v1_push_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 2,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_push_v1_push_proto_goTypes,
|
|
DependencyIndexes: file_push_v1_push_proto_depIdxs,
|
|
MessageInfos: file_push_v1_push_proto_msgTypes,
|
|
}.Build()
|
|
File_push_v1_push_proto = out.File
|
|
file_push_v1_push_proto_goTypes = nil
|
|
file_push_v1_push_proto_depIdxs = nil
|
|
}
|