diff --git a/database/user.go b/database/user.go index da3d9e6..80c249f 100644 --- a/database/user.go +++ b/database/user.go @@ -26,7 +26,7 @@ import ( "maunium.net/go/mautrix/id" "maunium.net/go/mautrix/util/dbutil" - "go.mau.fi/mautrix-gmessages/libgm/binary" + "go.mau.fi/mautrix-gmessages/libgm" ) type UserQuery struct { @@ -63,22 +63,13 @@ func (uq *UserQuery) GetByPhone(ctx context.Context, phone string) (*User, error return get[*User](uq, ctx, `SELECT rowid, mxid, phone, session, management_room, space_room, access_token FROM "user" WHERE phone=$1`, phone) } -type Session struct { - WebAuthKey []byte `json:"web_auth_key"` - AESKey []byte `json:"aes_key"` - HMACKey []byte `json:"hmac_key"` - - PhoneInfo *binary.Device `json:"phone_info"` - BrowserInfo *binary.Device `json:"browser_info"` -} - type User struct { db *Database RowID int MXID id.UserID Phone string - Session *Session + Session *libgm.AuthData ManagementRoom id.RoomID SpaceRoom id.RoomID @@ -95,7 +86,7 @@ func (user *User) Scan(row dbutil.Scannable) (*User, error) { return nil, err } if session.String != "" { - var sess Session + var sess libgm.AuthData err = json.Unmarshal([]byte(session.String), &sess) if err != nil { return nil, fmt.Errorf("failed to parse session: %w", err) diff --git a/gmtest/main.go b/gmtest/main.go index 2aaff6b..d0dbfe2 100644 --- a/gmtest/main.go +++ b/gmtest/main.go @@ -2,10 +2,8 @@ package main import ( "bufio" - "encoding/base64" "encoding/json" "errors" - "net/http" "os" "os/signal" "strings" @@ -21,13 +19,6 @@ import ( "go.mau.fi/mautrix-gmessages/libgm/events" ) -type Session struct { - *libgm.DevicePair - *crypto.Cryptor - *binary.WebAuthKey - Cookies []*http.Cookie -} - func must(err error) { if err != nil { panic(err) @@ -41,7 +32,7 @@ func mustReturn[T any](val T, err error) T { var cli *libgm.Client var log zerolog.Logger -var sess Session +var sess libgm.AuthData func main() { log = zerolog.New(zerolog.NewConsoleWriter(func(w *zerolog.ConsoleWriter) { @@ -61,22 +52,9 @@ func main() { if sess.Cryptor == nil { sess.Cryptor = crypto.NewCryptor(nil, nil) } - cli = libgm.NewClient(sess.DevicePair, sess.Cryptor, log, nil) - if sess.Cookies != nil { - cli.SetCookies(sess.Cookies) - } + cli = libgm.NewClient(&sess, log) cli.SetEventHandler(evtHandler) - log.Debug().Msg(base64.StdEncoding.EncodeToString(sess.GetWebAuthKey())) - if sess.DevicePair == nil { - pairer := mustReturn(cli.NewPairer(nil, 20)) - registered := mustReturn(pairer.RegisterPhoneRelay()) - must(cli.Connect(registered.Field5.RpcKey)) - } else { - //pairer := mustReturn(cli.NewPairer(nil, 20)) - //newKey := pairer.GetWebEncryptionKey(sess.GetWebAuthKey()) - //log.Debug().Msg(base64.StdEncoding.EncodeToString(newKey)) - must(cli.Connect(sess.GetWebAuthKey())) - } + must(cli.Connect()) c := make(chan os.Signal) input := make(chan string) @@ -111,7 +89,6 @@ func main() { } func saveSession() { - sess.Cookies = cli.GetCookies() file := mustReturn(os.OpenFile("session.json", os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0600)) must(json.NewEncoder(file).Encode(sess)) _ = file.Close() @@ -123,25 +100,22 @@ func evtHandler(rawEvt any) { log.Debug().Any("data", evt).Msg("Client is ready!") case *events.PairSuccessful: log.Debug().Any("data", evt).Msg("Pair successful") - sess.DevicePair = &libgm.DevicePair{ - Mobile: evt.PairDeviceData.Mobile, - Browser: evt.PairDeviceData.Browser, - } - sess.WebAuthKey = evt.PairDeviceData.WebAuthKeyData + //kd := evt.Data.(*binary.AuthenticationContainer_KeyData) + //sess.DevicePair = &pblite.DevicePair{ + // Mobile: kd.KeyData.Mobile, + // Browser: kd.KeyData.Browser, + //} + //sess.TachyonAuthToken = evt.AuthMessage.TachyonAuthToken saveSession() log.Debug().Msg("Wrote session") - case *binary.Event_MessageEvent: + case *binary.Message: log.Debug().Any("data", evt).Msg("Message event") - case *binary.Event_ConversationEvent: + case *binary.Conversation: log.Debug().Any("data", evt).Msg("Conversation event") case *events.QR: qrterminal.GenerateHalfBlock(evt.URL, qrterminal.L, os.Stdout) case *events.BrowserActive: log.Debug().Any("data", evt).Msg("Browser active") - case *events.Battery: - log.Debug().Any("data", evt).Msg("Battery") - case *events.DataConnection: - log.Debug().Any("data", evt).Msg("Data connection") default: log.Debug().Any("data", evt).Msg("Unknown event") } diff --git a/libgm/binary/authentication.pb.go b/libgm/binary/authentication.pb.go new file mode 100644 index 0000000..1a98122 --- /dev/null +++ b/libgm/binary/authentication.pb.go @@ -0,0 +1,1037 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.21.12 +// source: authentication.proto + +package binary + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +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) +) + +type BrowserDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserAgent string `protobuf:"bytes,1,opt,name=userAgent,proto3" json:"userAgent,omitempty"` + BrowserType BrowserTypes `protobuf:"varint,2,opt,name=browserType,proto3,enum=client.BrowserTypes" json:"browserType,omitempty"` + Os string `protobuf:"bytes,3,opt,name=os,proto3" json:"os,omitempty"` + SomeBool bool `protobuf:"varint,6,opt,name=someBool,proto3" json:"someBool,omitempty"` +} + +func (x *BrowserDetails) Reset() { + *x = BrowserDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_authentication_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BrowserDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BrowserDetails) ProtoMessage() {} + +func (x *BrowserDetails) ProtoReflect() protoreflect.Message { + mi := &file_authentication_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BrowserDetails.ProtoReflect.Descriptor instead. +func (*BrowserDetails) Descriptor() ([]byte, []int) { + return file_authentication_proto_rawDescGZIP(), []int{0} +} + +func (x *BrowserDetails) GetUserAgent() string { + if x != nil { + return x.UserAgent + } + return "" +} + +func (x *BrowserDetails) GetBrowserType() BrowserTypes { + if x != nil { + return x.BrowserType + } + return BrowserTypes_UNKNOWN_BROWSER_TYPE +} + +func (x *BrowserDetails) GetOs() string { + if x != nil { + return x.Os + } + return "" +} + +func (x *BrowserDetails) GetSomeBool() bool { + if x != nil { + return x.SomeBool + } + return false +} + +type AuthenticationContainer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AuthMessage *AuthenticationMessage `protobuf:"bytes,1,opt,name=authMessage,proto3" json:"authMessage,omitempty"` + BrowserDetails *BrowserDetails `protobuf:"bytes,3,opt,name=browserDetails,proto3" json:"browserDetails,omitempty"` + // Types that are assignable to Data: + // + // *AuthenticationContainer_KeyData + // *AuthenticationContainer_DeviceData + Data isAuthenticationContainer_Data `protobuf_oneof:"data"` +} + +func (x *AuthenticationContainer) Reset() { + *x = AuthenticationContainer{} + if protoimpl.UnsafeEnabled { + mi := &file_authentication_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthenticationContainer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthenticationContainer) ProtoMessage() {} + +func (x *AuthenticationContainer) ProtoReflect() protoreflect.Message { + mi := &file_authentication_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthenticationContainer.ProtoReflect.Descriptor instead. +func (*AuthenticationContainer) Descriptor() ([]byte, []int) { + return file_authentication_proto_rawDescGZIP(), []int{1} +} + +func (x *AuthenticationContainer) GetAuthMessage() *AuthenticationMessage { + if x != nil { + return x.AuthMessage + } + return nil +} + +func (x *AuthenticationContainer) GetBrowserDetails() *BrowserDetails { + if x != nil { + return x.BrowserDetails + } + return nil +} + +func (m *AuthenticationContainer) GetData() isAuthenticationContainer_Data { + if m != nil { + return m.Data + } + return nil +} + +func (x *AuthenticationContainer) GetKeyData() *KeyData { + if x, ok := x.GetData().(*AuthenticationContainer_KeyData); ok { + return x.KeyData + } + return nil +} + +func (x *AuthenticationContainer) GetDeviceData() *CurrentDeviceData { + if x, ok := x.GetData().(*AuthenticationContainer_DeviceData); ok { + return x.DeviceData + } + return nil +} + +type isAuthenticationContainer_Data interface { + isAuthenticationContainer_Data() +} + +type AuthenticationContainer_KeyData struct { + KeyData *KeyData `protobuf:"bytes,4,opt,name=keyData,proto3,oneof"` +} + +type AuthenticationContainer_DeviceData struct { + DeviceData *CurrentDeviceData `protobuf:"bytes,5,opt,name=deviceData,proto3,oneof"` +} + +func (*AuthenticationContainer_KeyData) isAuthenticationContainer_Data() {} + +func (*AuthenticationContainer_DeviceData) isAuthenticationContainer_Data() {} + +type AuthenticationMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` + Network string `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` + TachyonAuthToken []byte `protobuf:"bytes,6,opt,name=tachyonAuthToken,proto3" json:"tachyonAuthToken,omitempty"` + ConfigVersion *ConfigVersion `protobuf:"bytes,7,opt,name=configVersion,proto3" json:"configVersion,omitempty"` +} + +func (x *AuthenticationMessage) Reset() { + *x = AuthenticationMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_authentication_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthenticationMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthenticationMessage) ProtoMessage() {} + +func (x *AuthenticationMessage) ProtoReflect() protoreflect.Message { + mi := &file_authentication_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthenticationMessage.ProtoReflect.Descriptor instead. +func (*AuthenticationMessage) Descriptor() ([]byte, []int) { + return file_authentication_proto_rawDescGZIP(), []int{2} +} + +func (x *AuthenticationMessage) GetRequestID() string { + if x != nil { + return x.RequestID + } + return "" +} + +func (x *AuthenticationMessage) GetNetwork() string { + if x != nil { + return x.Network + } + return "" +} + +func (x *AuthenticationMessage) GetTachyonAuthToken() []byte { + if x != nil { + return x.TachyonAuthToken + } + return nil +} + +func (x *AuthenticationMessage) GetConfigVersion() *ConfigVersion { + if x != nil { + return x.ConfigVersion + } + return nil +} + +type ECDSAKeys struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Field1 int64 `protobuf:"varint,1,opt,name=field1,proto3" json:"field1,omitempty"` // idk? + EncryptedKeys []byte `protobuf:"bytes,2,opt,name=encryptedKeys,proto3" json:"encryptedKeys,omitempty"` +} + +func (x *ECDSAKeys) Reset() { + *x = ECDSAKeys{} + if protoimpl.UnsafeEnabled { + mi := &file_authentication_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ECDSAKeys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ECDSAKeys) ProtoMessage() {} + +func (x *ECDSAKeys) ProtoReflect() protoreflect.Message { + mi := &file_authentication_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ECDSAKeys.ProtoReflect.Descriptor instead. +func (*ECDSAKeys) Descriptor() ([]byte, []int) { + return file_authentication_proto_rawDescGZIP(), []int{3} +} + +func (x *ECDSAKeys) GetField1() int64 { + if x != nil { + return x.Field1 + } + return 0 +} + +func (x *ECDSAKeys) GetEncryptedKeys() []byte { + if x != nil { + return x.EncryptedKeys + } + return nil +} + +type KeyData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Mobile *Device `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"` + EcdsaKeys *ECDSAKeys `protobuf:"bytes,6,opt,name=ecdsaKeys,proto3" json:"ecdsaKeys,omitempty"` + WebAuthKeyData *WebAuthKey `protobuf:"bytes,2,opt,name=webAuthKeyData,proto3" json:"webAuthKeyData,omitempty"` + Browser *Device `protobuf:"bytes,3,opt,name=browser,proto3" json:"browser,omitempty"` +} + +func (x *KeyData) Reset() { + *x = KeyData{} + if protoimpl.UnsafeEnabled { + mi := &file_authentication_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyData) ProtoMessage() {} + +func (x *KeyData) ProtoReflect() protoreflect.Message { + mi := &file_authentication_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyData.ProtoReflect.Descriptor instead. +func (*KeyData) Descriptor() ([]byte, []int) { + return file_authentication_proto_rawDescGZIP(), []int{4} +} + +func (x *KeyData) GetMobile() *Device { + if x != nil { + return x.Mobile + } + return nil +} + +func (x *KeyData) GetEcdsaKeys() *ECDSAKeys { + if x != nil { + return x.EcdsaKeys + } + return nil +} + +func (x *KeyData) GetWebAuthKeyData() *WebAuthKey { + if x != nil { + return x.WebAuthKeyData + } + return nil +} + +func (x *KeyData) GetBrowser() *Device { + if x != nil { + return x.Browser + } + return nil +} + +type WebAuthKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WebAuthKey []byte `protobuf:"bytes,1,opt,name=webAuthKey,proto3" json:"webAuthKey,omitempty"` + ValidFor int64 `protobuf:"varint,2,opt,name=validFor,proto3" json:"validFor,omitempty"` +} + +func (x *WebAuthKey) Reset() { + *x = WebAuthKey{} + if protoimpl.UnsafeEnabled { + mi := &file_authentication_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebAuthKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebAuthKey) ProtoMessage() {} + +func (x *WebAuthKey) ProtoReflect() protoreflect.Message { + mi := &file_authentication_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebAuthKey.ProtoReflect.Descriptor instead. +func (*WebAuthKey) Descriptor() ([]byte, []int) { + return file_authentication_proto_rawDescGZIP(), []int{5} +} + +func (x *WebAuthKey) GetWebAuthKey() []byte { + if x != nil { + return x.WebAuthKey + } + return nil +} + +func (x *WebAuthKey) GetValidFor() int64 { + if x != nil { + return x.ValidFor + } + return 0 +} + +type CurrentDeviceData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Browser *Device `protobuf:"bytes,1,opt,name=browser,proto3" json:"browser,omitempty"` +} + +func (x *CurrentDeviceData) Reset() { + *x = CurrentDeviceData{} + if protoimpl.UnsafeEnabled { + mi := &file_authentication_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CurrentDeviceData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CurrentDeviceData) ProtoMessage() {} + +func (x *CurrentDeviceData) ProtoReflect() protoreflect.Message { + mi := &file_authentication_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CurrentDeviceData.ProtoReflect.Descriptor instead. +func (*CurrentDeviceData) Descriptor() ([]byte, []int) { + return file_authentication_proto_rawDescGZIP(), []int{6} +} + +func (x *CurrentDeviceData) GetBrowser() *Device { + if x != nil { + return x.Browser + } + return nil +} + +type UrlData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PairingKey []byte `protobuf:"bytes,1,opt,name=pairingKey,proto3" json:"pairingKey,omitempty"` + AESKey []byte `protobuf:"bytes,2,opt,name=AESKey,proto3" json:"AESKey,omitempty"` + HMACKey []byte `protobuf:"bytes,3,opt,name=HMACKey,proto3" json:"HMACKey,omitempty"` +} + +func (x *UrlData) Reset() { + *x = UrlData{} + if protoimpl.UnsafeEnabled { + mi := &file_authentication_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UrlData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UrlData) ProtoMessage() {} + +func (x *UrlData) ProtoReflect() protoreflect.Message { + mi := &file_authentication_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UrlData.ProtoReflect.Descriptor instead. +func (*UrlData) Descriptor() ([]byte, []int) { + return file_authentication_proto_rawDescGZIP(), []int{7} +} + +func (x *UrlData) GetPairingKey() []byte { + if x != nil { + return x.PairingKey + } + return nil +} + +func (x *UrlData) GetAESKey() []byte { + if x != nil { + return x.AESKey + } + return nil +} + +func (x *UrlData) GetHMACKey() []byte { + if x != nil { + return x.HMACKey + } + return nil +} + +type TokenData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TachyonAuthToken []byte `protobuf:"bytes,1,opt,name=tachyonAuthToken,proto3" json:"tachyonAuthToken,omitempty"` + TTL int64 `protobuf:"varint,2,opt,name=TTL,proto3" json:"TTL,omitempty"` +} + +func (x *TokenData) Reset() { + *x = TokenData{} + if protoimpl.UnsafeEnabled { + mi := &file_authentication_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenData) ProtoMessage() {} + +func (x *TokenData) ProtoReflect() protoreflect.Message { + mi := &file_authentication_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenData.ProtoReflect.Descriptor instead. +func (*TokenData) Descriptor() ([]byte, []int) { + return file_authentication_proto_rawDescGZIP(), []int{8} +} + +func (x *TokenData) GetTachyonAuthToken() []byte { + if x != nil { + return x.TachyonAuthToken + } + return nil +} + +func (x *TokenData) GetTTL() int64 { + if x != nil { + return x.TTL + } + return 0 +} + +type PairedData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Mobile *Device `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"` + TokenData *TokenData `protobuf:"bytes,2,opt,name=tokenData,proto3" json:"tokenData,omitempty"` + Browser *Device `protobuf:"bytes,3,opt,name=browser,proto3" json:"browser,omitempty"` +} + +func (x *PairedData) Reset() { + *x = PairedData{} + if protoimpl.UnsafeEnabled { + mi := &file_authentication_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PairedData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PairedData) ProtoMessage() {} + +func (x *PairedData) ProtoReflect() protoreflect.Message { + mi := &file_authentication_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PairedData.ProtoReflect.Descriptor instead. +func (*PairedData) Descriptor() ([]byte, []int) { + return file_authentication_proto_rawDescGZIP(), []int{9} +} + +func (x *PairedData) GetMobile() *Device { + if x != nil { + return x.Mobile + } + return nil +} + +func (x *PairedData) GetTokenData() *TokenData { + if x != nil { + return x.TokenData + } + return nil +} + +func (x *PairedData) GetBrowser() *Device { + if x != nil { + return x.Browser + } + return nil +} + +type RevokePairData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RevokedDevice *Device `protobuf:"bytes,1,opt,name=revokedDevice,proto3" json:"revokedDevice,omitempty"` +} + +func (x *RevokePairData) Reset() { + *x = RevokePairData{} + if protoimpl.UnsafeEnabled { + mi := &file_authentication_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RevokePairData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokePairData) ProtoMessage() {} + +func (x *RevokePairData) ProtoReflect() protoreflect.Message { + mi := &file_authentication_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokePairData.ProtoReflect.Descriptor instead. +func (*RevokePairData) Descriptor() ([]byte, []int) { + return file_authentication_proto_rawDescGZIP(), []int{10} +} + +func (x *RevokePairData) GetRevokedDevice() *Device { + if x != nil { + return x.RevokedDevice + } + return nil +} + +var File_authentication_proto protoreflect.FileDescriptor + +var file_authentication_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x0e, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x0b, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x1a, 0x0a, + 0x08, 0x73, 0x6f, 0x6d, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x73, 0x6f, 0x6d, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x22, 0xac, 0x02, 0x0a, 0x17, 0x41, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x46, + 0x0a, 0x0e, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x44, 0x61, 0x74, + 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x61, 0x74, 0x61, + 0x48, 0x00, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, 0x0a, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xba, 0x01, 0x0a, 0x15, 0x41, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, + 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x61, + 0x63, 0x68, 0x79, 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x61, 0x63, 0x68, 0x79, 0x6f, 0x6e, 0x41, 0x75, 0x74, + 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x3d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x09, 0x45, 0x43, 0x44, 0x53, 0x41, 0x4b, 0x65, + 0x79, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, + 0x22, 0xdc, 0x01, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x06, + 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x06, + 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x63, 0x64, 0x73, 0x61, 0x4b, + 0x65, 0x79, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x43, 0x44, 0x53, 0x41, + 0x4b, 0x65, 0x79, 0x73, 0x52, 0x09, 0x65, 0x63, 0x64, 0x73, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x12, + 0x42, 0x0a, 0x0e, 0x77, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x44, 0x61, 0x74, + 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x57, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68, + 0x4b, 0x65, 0x79, 0x52, 0x0e, 0x77, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x22, + 0x48, 0x0a, 0x0a, 0x57, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, + 0x0a, 0x77, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0a, 0x77, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, + 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, 0x22, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, + 0x0a, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x52, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x22, 0x5b, 0x0a, 0x07, 0x55, 0x72, + 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, + 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x69, 0x72, 0x69, + 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x45, 0x53, 0x4b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x41, 0x45, 0x53, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, + 0x07, 0x48, 0x4d, 0x41, 0x43, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, + 0x48, 0x4d, 0x41, 0x43, 0x4b, 0x65, 0x79, 0x22, 0x49, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x61, 0x63, 0x68, 0x79, 0x6f, 0x6e, 0x41, + 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, + 0x74, 0x61, 0x63, 0x68, 0x79, 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x10, 0x0a, 0x03, 0x54, 0x54, 0x4c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x54, + 0x54, 0x4c, 0x22, 0x9b, 0x01, 0x0a, 0x0a, 0x50, 0x61, 0x69, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x28, 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, + 0x22, 0x48, 0x0a, 0x0e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x50, 0x61, 0x69, 0x72, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, + 0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_authentication_proto_rawDescOnce sync.Once + file_authentication_proto_rawDescData = file_authentication_proto_rawDesc +) + +func file_authentication_proto_rawDescGZIP() []byte { + file_authentication_proto_rawDescOnce.Do(func() { + file_authentication_proto_rawDescData = protoimpl.X.CompressGZIP(file_authentication_proto_rawDescData) + }) + return file_authentication_proto_rawDescData +} + +var file_authentication_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_authentication_proto_goTypes = []interface{}{ + (*BrowserDetails)(nil), // 0: authentication.BrowserDetails + (*AuthenticationContainer)(nil), // 1: authentication.AuthenticationContainer + (*AuthenticationMessage)(nil), // 2: authentication.AuthenticationMessage + (*ECDSAKeys)(nil), // 3: authentication.ECDSAKeys + (*KeyData)(nil), // 4: authentication.KeyData + (*WebAuthKey)(nil), // 5: authentication.WebAuthKey + (*CurrentDeviceData)(nil), // 6: authentication.CurrentDeviceData + (*UrlData)(nil), // 7: authentication.UrlData + (*TokenData)(nil), // 8: authentication.TokenData + (*PairedData)(nil), // 9: authentication.PairedData + (*RevokePairData)(nil), // 10: authentication.RevokePairData + (BrowserTypes)(0), // 11: client.BrowserTypes + (*ConfigVersion)(nil), // 12: messages.ConfigVersion + (*Device)(nil), // 13: messages.Device +} +var file_authentication_proto_depIdxs = []int32{ + 11, // 0: authentication.BrowserDetails.browserType:type_name -> client.BrowserTypes + 2, // 1: authentication.AuthenticationContainer.authMessage:type_name -> authentication.AuthenticationMessage + 0, // 2: authentication.AuthenticationContainer.browserDetails:type_name -> authentication.BrowserDetails + 4, // 3: authentication.AuthenticationContainer.keyData:type_name -> authentication.KeyData + 6, // 4: authentication.AuthenticationContainer.deviceData:type_name -> authentication.CurrentDeviceData + 12, // 5: authentication.AuthenticationMessage.configVersion:type_name -> messages.ConfigVersion + 13, // 6: authentication.KeyData.mobile:type_name -> messages.Device + 3, // 7: authentication.KeyData.ecdsaKeys:type_name -> authentication.ECDSAKeys + 5, // 8: authentication.KeyData.webAuthKeyData:type_name -> authentication.WebAuthKey + 13, // 9: authentication.KeyData.browser:type_name -> messages.Device + 13, // 10: authentication.CurrentDeviceData.browser:type_name -> messages.Device + 13, // 11: authentication.PairedData.mobile:type_name -> messages.Device + 8, // 12: authentication.PairedData.tokenData:type_name -> authentication.TokenData + 13, // 13: authentication.PairedData.browser:type_name -> messages.Device + 13, // 14: authentication.RevokePairData.revokedDevice:type_name -> messages.Device + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_authentication_proto_init() } +func file_authentication_proto_init() { + if File_authentication_proto != nil { + return + } + file_messages_proto_init() + file_client_proto_init() + if !protoimpl.UnsafeEnabled { + file_authentication_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BrowserDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AuthenticationContainer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AuthenticationMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ECDSAKeys); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebAuthKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CurrentDeviceData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UrlData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PairedData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RevokePairData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_authentication_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*AuthenticationContainer_KeyData)(nil), + (*AuthenticationContainer_DeviceData)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_authentication_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_authentication_proto_goTypes, + DependencyIndexes: file_authentication_proto_depIdxs, + MessageInfos: file_authentication_proto_msgTypes, + }.Build() + File_authentication_proto = out.File + file_authentication_proto_rawDesc = nil + file_authentication_proto_goTypes = nil + file_authentication_proto_depIdxs = nil +} diff --git a/libgm/binary/client.pb.go b/libgm/binary/client.pb.go index a85ea21..5559f1d 100644 --- a/libgm/binary/client.pb.go +++ b/libgm/binary/client.pb.go @@ -20,20 +20,165 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type SendMessage struct { +type BugleMessageType int32 + +const ( + BugleMessageType_UNKNOWN_BUGLE_MESSAGE_TYPE BugleMessageType = 0 + BugleMessageType_SMS BugleMessageType = 1 + BugleMessageType_MMS BugleMessageType = 2 + BugleMessageType_RCS BugleMessageType = 3 + BugleMessageType_CLOUD_SYNC BugleMessageType = 4 + BugleMessageType_IMDN_DELIVERED BugleMessageType = 5 + BugleMessageType_IMDN_DISPLAYED BugleMessageType = 6 + BugleMessageType_IMDN_FALLBACK BugleMessageType = 7 + BugleMessageType_RCS_GENERIC BugleMessageType = 8 + BugleMessageType_FTD BugleMessageType = 9 + BugleMessageType_FT_E2EE_LEGACY BugleMessageType = 10 + BugleMessageType_FT_E2EE_XML BugleMessageType = 11 + BugleMessageType_LIGHTER_MESSAGE BugleMessageType = 12 + BugleMessageType_RBM_SPAM_REPORT BugleMessageType = 13 + BugleMessageType_SATELLITE BugleMessageType = 14 +) + +// Enum value maps for BugleMessageType. +var ( + BugleMessageType_name = map[int32]string{ + 0: "UNKNOWN_BUGLE_MESSAGE_TYPE", + 1: "SMS", + 2: "MMS", + 3: "RCS", + 4: "CLOUD_SYNC", + 5: "IMDN_DELIVERED", + 6: "IMDN_DISPLAYED", + 7: "IMDN_FALLBACK", + 8: "RCS_GENERIC", + 9: "FTD", + 10: "FT_E2EE_LEGACY", + 11: "FT_E2EE_XML", + 12: "LIGHTER_MESSAGE", + 13: "RBM_SPAM_REPORT", + 14: "SATELLITE", + } + BugleMessageType_value = map[string]int32{ + "UNKNOWN_BUGLE_MESSAGE_TYPE": 0, + "SMS": 1, + "MMS": 2, + "RCS": 3, + "CLOUD_SYNC": 4, + "IMDN_DELIVERED": 5, + "IMDN_DISPLAYED": 6, + "IMDN_FALLBACK": 7, + "RCS_GENERIC": 8, + "FTD": 9, + "FT_E2EE_LEGACY": 10, + "FT_E2EE_XML": 11, + "LIGHTER_MESSAGE": 12, + "RBM_SPAM_REPORT": 13, + "SATELLITE": 14, + } +) + +func (x BugleMessageType) Enum() *BugleMessageType { + p := new(BugleMessageType) + *p = x + return p +} + +func (x BugleMessageType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BugleMessageType) Descriptor() protoreflect.EnumDescriptor { + return file_client_proto_enumTypes[0].Descriptor() +} + +func (BugleMessageType) Type() protoreflect.EnumType { + return &file_client_proto_enumTypes[0] +} + +func (x BugleMessageType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BugleMessageType.Descriptor instead. +func (BugleMessageType) EnumDescriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{0} +} + +type BrowserTypes int32 + +const ( + BrowserTypes_UNKNOWN_BROWSER_TYPE BrowserTypes = 0 + BrowserTypes_OTHER BrowserTypes = 1 + BrowserTypes_CHROME BrowserTypes = 2 + BrowserTypes_FIREFOX BrowserTypes = 3 + BrowserTypes_SAFARI BrowserTypes = 4 + BrowserTypes_OPERA BrowserTypes = 5 + BrowserTypes_IE BrowserTypes = 6 + BrowserTypes_EDGE BrowserTypes = 7 +) + +// Enum value maps for BrowserTypes. +var ( + BrowserTypes_name = map[int32]string{ + 0: "UNKNOWN_BROWSER_TYPE", + 1: "OTHER", + 2: "CHROME", + 3: "FIREFOX", + 4: "SAFARI", + 5: "OPERA", + 6: "IE", + 7: "EDGE", + } + BrowserTypes_value = map[string]int32{ + "UNKNOWN_BROWSER_TYPE": 0, + "OTHER": 1, + "CHROME": 2, + "FIREFOX": 3, + "SAFARI": 4, + "OPERA": 5, + "IE": 6, + "EDGE": 7, + } +) + +func (x BrowserTypes) Enum() *BrowserTypes { + p := new(BrowserTypes) + *p = x + return p +} + +func (x BrowserTypes) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BrowserTypes) Descriptor() protoreflect.EnumDescriptor { + return file_client_proto_enumTypes[1].Descriptor() +} + +func (BrowserTypes) Type() protoreflect.EnumType { + return &file_client_proto_enumTypes[1] +} + +func (x BrowserTypes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BrowserTypes.Descriptor instead. +func (BrowserTypes) EnumDescriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{1} +} + +type NotifyDittoActivityPayload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PairedDevice *Device `protobuf:"bytes,1,opt,name=pairedDevice,proto3" json:"pairedDevice,omitempty"` - MessageData *MessageData `protobuf:"bytes,2,opt,name=messageData,proto3" json:"messageData,omitempty"` - AuthData *AuthMessage `protobuf:"bytes,3,opt,name=authData,proto3" json:"authData,omitempty"` - TTL int64 `protobuf:"varint,5,opt,name=TTL,proto3" json:"TTL,omitempty"` - EmptyArr *EmptyArr `protobuf:"bytes,9,opt,name=emptyArr,proto3" json:"emptyArr,omitempty"` + Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` } -func (x *SendMessage) Reset() { - *x = SendMessage{} +func (x *NotifyDittoActivityPayload) Reset() { + *x = NotifyDittoActivityPayload{} if protoimpl.UnsafeEnabled { mi := &file_client_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -41,13 +186,13 @@ func (x *SendMessage) Reset() { } } -func (x *SendMessage) String() string { +func (x *NotifyDittoActivityPayload) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SendMessage) ProtoMessage() {} +func (*NotifyDittoActivityPayload) ProtoMessage() {} -func (x *SendMessage) ProtoReflect() protoreflect.Message { +func (x *NotifyDittoActivityPayload) ProtoReflect() protoreflect.Message { mi := &file_client_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59,46 +204,206 @@ func (x *SendMessage) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SendMessage.ProtoReflect.Descriptor instead. -func (*SendMessage) Descriptor() ([]byte, []int) { +// Deprecated: Use NotifyDittoActivityPayload.ProtoReflect.Descriptor instead. +func (*NotifyDittoActivityPayload) Descriptor() ([]byte, []int) { return file_client_proto_rawDescGZIP(), []int{0} } -func (x *SendMessage) GetPairedDevice() *Device { +func (x *NotifyDittoActivityPayload) GetSuccess() bool { if x != nil { - return x.PairedDevice + return x.Success + } + return false +} + +type AckMessageResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Container *AckContainer `protobuf:"bytes,1,opt,name=container,proto3" json:"container,omitempty"` +} + +func (x *AckMessageResponse) Reset() { + *x = AckMessageResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AckMessageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AckMessageResponse) ProtoMessage() {} + +func (x *AckMessageResponse) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AckMessageResponse.ProtoReflect.Descriptor instead. +func (*AckMessageResponse) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{1} +} + +func (x *AckMessageResponse) GetContainer() *AckContainer { + if x != nil { + return x.Container } return nil } -func (x *SendMessage) GetMessageData() *MessageData { +type AckContainer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *AckData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *AckContainer) Reset() { + *x = AckContainer{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AckContainer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AckContainer) ProtoMessage() {} + +func (x *AckContainer) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AckContainer.ProtoReflect.Descriptor instead. +func (*AckContainer) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{2} +} + +func (x *AckContainer) GetData() *AckData { if x != nil { - return x.MessageData + return x.Data } return nil } -func (x *SendMessage) GetAuthData() *AuthMessage { +type AckData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AckAmount *AckAmount `protobuf:"bytes,4,opt,name=ackAmount,proto3" json:"ackAmount,omitempty"` +} + +func (x *AckData) Reset() { + *x = AckData{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AckData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AckData) ProtoMessage() {} + +func (x *AckData) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AckData.ProtoReflect.Descriptor instead. +func (*AckData) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{3} +} + +func (x *AckData) GetAckAmount() *AckAmount { if x != nil { - return x.AuthData + return x.AckAmount } return nil } -func (x *SendMessage) GetTTL() int64 { +type AckAmount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *AckAmount) Reset() { + *x = AckAmount{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AckAmount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AckAmount) ProtoMessage() {} + +func (x *AckAmount) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AckAmount.ProtoReflect.Descriptor instead. +func (*AckAmount) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{4} +} + +func (x *AckAmount) GetCount() int32 { if x != nil { - return x.TTL + return x.Count } return 0 } -func (x *SendMessage) GetEmptyArr() *EmptyArr { - if x != nil { - return x.EmptyArr - } - return nil -} - type AckMessagePayload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -112,7 +417,7 @@ type AckMessagePayload struct { func (x *AckMessagePayload) Reset() { *x = AckMessagePayload{} if protoimpl.UnsafeEnabled { - mi := &file_client_proto_msgTypes[1] + mi := &file_client_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -125,7 +430,7 @@ func (x *AckMessagePayload) String() string { func (*AckMessagePayload) ProtoMessage() {} func (x *AckMessagePayload) ProtoReflect() protoreflect.Message { - mi := &file_client_proto_msgTypes[1] + mi := &file_client_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -138,7 +443,7 @@ func (x *AckMessagePayload) ProtoReflect() protoreflect.Message { // Deprecated: Use AckMessagePayload.ProtoReflect.Descriptor instead. func (*AckMessagePayload) Descriptor() ([]byte, []int) { - return file_client_proto_rawDescGZIP(), []int{1} + return file_client_proto_rawDescGZIP(), []int{5} } func (x *AckMessagePayload) GetAuthData() *AuthMessage { @@ -174,7 +479,7 @@ type AckMessageData struct { func (x *AckMessageData) Reset() { *x = AckMessageData{} if protoimpl.UnsafeEnabled { - mi := &file_client_proto_msgTypes[2] + mi := &file_client_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -187,7 +492,7 @@ func (x *AckMessageData) String() string { func (*AckMessageData) ProtoMessage() {} func (x *AckMessageData) ProtoReflect() protoreflect.Message { - mi := &file_client_proto_msgTypes[2] + mi := &file_client_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -200,7 +505,7 @@ func (x *AckMessageData) ProtoReflect() protoreflect.Message { // Deprecated: Use AckMessageData.ProtoReflect.Descriptor instead. func (*AckMessageData) Descriptor() ([]byte, []int) { - return file_client_proto_rawDescGZIP(), []int{2} + return file_client_proto_rawDescGZIP(), []int{6} } func (x *AckMessageData) GetRequestID() string { @@ -229,7 +534,7 @@ type ImageMetaData struct { func (x *ImageMetaData) Reset() { *x = ImageMetaData{} if protoimpl.UnsafeEnabled { - mi := &file_client_proto_msgTypes[3] + mi := &file_client_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -242,7 +547,7 @@ func (x *ImageMetaData) String() string { func (*ImageMetaData) ProtoMessage() {} func (x *ImageMetaData) ProtoReflect() protoreflect.Message { - mi := &file_client_proto_msgTypes[3] + mi := &file_client_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -255,7 +560,7 @@ func (x *ImageMetaData) ProtoReflect() protoreflect.Message { // Deprecated: Use ImageMetaData.ProtoReflect.Descriptor instead. func (*ImageMetaData) Descriptor() ([]byte, []int) { - return file_client_proto_rawDescGZIP(), []int{3} + return file_client_proto_rawDescGZIP(), []int{7} } func (x *ImageMetaData) GetImageID() string { @@ -284,7 +589,7 @@ type UploadImagePayload struct { func (x *UploadImagePayload) Reset() { *x = UploadImagePayload{} if protoimpl.UnsafeEnabled { - mi := &file_client_proto_msgTypes[4] + mi := &file_client_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -297,7 +602,7 @@ func (x *UploadImagePayload) String() string { func (*UploadImagePayload) ProtoMessage() {} func (x *UploadImagePayload) ProtoReflect() protoreflect.Message { - mi := &file_client_proto_msgTypes[4] + mi := &file_client_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -310,7 +615,7 @@ func (x *UploadImagePayload) ProtoReflect() protoreflect.Message { // Deprecated: Use UploadImagePayload.ProtoReflect.Descriptor instead. func (*UploadImagePayload) Descriptor() ([]byte, []int) { - return file_client_proto_rawDescGZIP(), []int{4} + return file_client_proto_rawDescGZIP(), []int{8} } func (x *UploadImagePayload) GetMetaData() *ImageMetaData { @@ -338,7 +643,7 @@ type BugleBackendService struct { func (x *BugleBackendService) Reset() { *x = BugleBackendService{} if protoimpl.UnsafeEnabled { - mi := &file_client_proto_msgTypes[5] + mi := &file_client_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -351,7 +656,7 @@ func (x *BugleBackendService) String() string { func (*BugleBackendService) ProtoMessage() {} func (x *BugleBackendService) ProtoReflect() protoreflect.Message { - mi := &file_client_proto_msgTypes[5] + mi := &file_client_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -364,7 +669,7 @@ func (x *BugleBackendService) ProtoReflect() protoreflect.Message { // Deprecated: Use BugleBackendService.ProtoReflect.Descriptor instead. func (*BugleBackendService) Descriptor() ([]byte, []int) { - return file_client_proto_rawDescGZIP(), []int{5} + return file_client_proto_rawDescGZIP(), []int{9} } func (x *BugleBackendService) GetData() *BugleCode { @@ -385,7 +690,7 @@ type BugleCode struct { func (x *BugleCode) Reset() { *x = BugleCode{} if protoimpl.UnsafeEnabled { - mi := &file_client_proto_msgTypes[6] + mi := &file_client_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -398,7 +703,7 @@ func (x *BugleCode) String() string { func (*BugleCode) ProtoMessage() {} func (x *BugleCode) ProtoReflect() protoreflect.Message { - mi := &file_client_proto_msgTypes[6] + mi := &file_client_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -411,7 +716,7 @@ func (x *BugleCode) ProtoReflect() protoreflect.Message { // Deprecated: Use BugleCode.ProtoReflect.Descriptor instead. func (*BugleCode) Descriptor() ([]byte, []int) { - return file_client_proto_rawDescGZIP(), []int{6} + return file_client_proto_rawDescGZIP(), []int{10} } func (x *BugleCode) GetType() int64 { @@ -426,57 +731,83 @@ var File_client_proto protoreflect.FileDescriptor var file_client_proto_rawDesc = []byte{ 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x1a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf1, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x70, 0x61, 0x69, 0x72, 0x65, 0x64, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x0c, - 0x70, 0x61, 0x69, 0x72, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x0b, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, - 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, - 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x54, 0x4c, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x54, 0x54, 0x4c, 0x12, 0x2e, 0x0a, 0x08, 0x65, 0x6d, - 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, - 0x52, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x22, 0x8e, 0x01, 0x0a, 0x11, 0x41, - 0x63, 0x6b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x12, 0x31, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x41, 0x75, - 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x52, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x41, 0x72, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x43, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x43, 0x6c, 0x75, 0x65, 0x22, 0x58, 0x0a, 0x0e, 0x41, - 0x63, 0x6b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, - 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x12, 0x28, 0x0a, 0x06, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x06, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x47, 0x0a, 0x0d, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x65, - 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x44, - 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x22, 0x7a, - 0x0a, 0x12, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, - 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, - 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x22, 0x3c, 0x0a, 0x13, 0x42, 0x75, - 0x67, 0x6c, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x25, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x42, 0x75, 0x67, 0x6c, 0x65, 0x43, 0x6f, - 0x64, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1f, 0x0a, 0x09, 0x42, 0x75, 0x67, 0x6c, - 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, - 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x36, 0x0a, 0x1a, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, + 0x44, 0x69, 0x74, 0x74, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x48, + 0x0a, 0x12, 0x41, 0x63, 0x6b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2e, 0x41, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x09, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x22, 0x33, 0x0a, 0x0c, 0x41, 0x63, 0x6b, 0x43, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, + 0x41, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, + 0x07, 0x41, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x09, 0x61, 0x63, 0x6b, 0x41, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x6b, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x09, + 0x61, 0x63, 0x6b, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x21, 0x0a, 0x09, 0x41, 0x63, 0x6b, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8e, 0x01, 0x0a, + 0x11, 0x41, 0x63, 0x6b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, + 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x61, 0x75, 0x74, + 0x68, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x52, 0x08, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x41, 0x72, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x43, 0x6c, 0x75, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x43, 0x6c, 0x75, 0x65, 0x22, 0x58, 0x0a, + 0x0e, 0x41, 0x63, 0x6b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x12, 0x28, 0x0a, + 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, + 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x47, 0x0a, 0x0d, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x22, 0x7a, 0x0a, 0x12, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x44, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x75, 0x74, + 0x68, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x22, 0x3c, 0x0a, 0x13, + 0x42, 0x75, 0x67, 0x6c, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x42, 0x75, 0x67, 0x6c, 0x65, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1f, 0x0a, 0x09, 0x42, 0x75, + 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x90, 0x02, 0x0a, 0x10, + 0x42, 0x75, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1e, 0x0a, 0x1a, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x42, 0x55, 0x47, 0x4c, + 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x53, 0x4d, 0x53, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x4d, 0x53, + 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x43, 0x53, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x43, + 0x4c, 0x4f, 0x55, 0x44, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x49, + 0x4d, 0x44, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x45, 0x44, 0x10, 0x05, 0x12, + 0x12, 0x0a, 0x0e, 0x49, 0x4d, 0x44, 0x4e, 0x5f, 0x44, 0x49, 0x53, 0x50, 0x4c, 0x41, 0x59, 0x45, + 0x44, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x4d, 0x44, 0x4e, 0x5f, 0x46, 0x41, 0x4c, 0x4c, + 0x42, 0x41, 0x43, 0x4b, 0x10, 0x07, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x43, 0x53, 0x5f, 0x47, 0x45, + 0x4e, 0x45, 0x52, 0x49, 0x43, 0x10, 0x08, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x54, 0x44, 0x10, 0x09, + 0x12, 0x12, 0x0a, 0x0e, 0x46, 0x54, 0x5f, 0x45, 0x32, 0x45, 0x45, 0x5f, 0x4c, 0x45, 0x47, 0x41, + 0x43, 0x59, 0x10, 0x0a, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x54, 0x5f, 0x45, 0x32, 0x45, 0x45, 0x5f, + 0x58, 0x4d, 0x4c, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x45, 0x52, + 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x42, + 0x4d, 0x5f, 0x53, 0x50, 0x41, 0x4d, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x0d, 0x12, + 0x0d, 0x0a, 0x09, 0x53, 0x41, 0x54, 0x45, 0x4c, 0x4c, 0x49, 0x54, 0x45, 0x10, 0x0e, 0x2a, 0x75, + 0x0a, 0x0c, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x18, + 0x0a, 0x14, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x42, 0x52, 0x4f, 0x57, 0x53, 0x45, + 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, + 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x48, 0x52, 0x4f, 0x4d, 0x45, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x46, 0x49, 0x52, 0x45, 0x46, 0x4f, 0x58, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x41, 0x46, 0x41, 0x52, 0x49, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x50, 0x45, 0x52, + 0x41, 0x10, 0x05, 0x12, 0x06, 0x0a, 0x02, 0x49, 0x45, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x45, + 0x44, 0x47, 0x45, 0x10, 0x07, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, + 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -491,36 +822,41 @@ func file_client_proto_rawDescGZIP() []byte { return file_client_proto_rawDescData } -var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_client_proto_goTypes = []interface{}{ - (*SendMessage)(nil), // 0: client.SendMessage - (*AckMessagePayload)(nil), // 1: client.AckMessagePayload - (*AckMessageData)(nil), // 2: client.AckMessageData - (*ImageMetaData)(nil), // 3: client.ImageMetaData - (*UploadImagePayload)(nil), // 4: client.UploadImagePayload - (*BugleBackendService)(nil), // 5: client.BugleBackendService - (*BugleCode)(nil), // 6: client.BugleCode - (*Device)(nil), // 7: messages.Device - (*MessageData)(nil), // 8: messages.MessageData - (*AuthMessage)(nil), // 9: messages.AuthMessage - (*EmptyArr)(nil), // 10: messages.EmptyArr + (BugleMessageType)(0), // 0: client.BugleMessageType + (BrowserTypes)(0), // 1: client.BrowserTypes + (*NotifyDittoActivityPayload)(nil), // 2: client.NotifyDittoActivityPayload + (*AckMessageResponse)(nil), // 3: client.AckMessageResponse + (*AckContainer)(nil), // 4: client.AckContainer + (*AckData)(nil), // 5: client.AckData + (*AckAmount)(nil), // 6: client.AckAmount + (*AckMessagePayload)(nil), // 7: client.AckMessagePayload + (*AckMessageData)(nil), // 8: client.AckMessageData + (*ImageMetaData)(nil), // 9: client.ImageMetaData + (*UploadImagePayload)(nil), // 10: client.UploadImagePayload + (*BugleBackendService)(nil), // 11: client.BugleBackendService + (*BugleCode)(nil), // 12: client.BugleCode + (*AuthMessage)(nil), // 13: messages.AuthMessage + (*EmptyArr)(nil), // 14: messages.EmptyArr + (*Device)(nil), // 15: messages.Device } var file_client_proto_depIdxs = []int32{ - 7, // 0: client.SendMessage.pairedDevice:type_name -> messages.Device - 8, // 1: client.SendMessage.messageData:type_name -> messages.MessageData - 9, // 2: client.SendMessage.authData:type_name -> messages.AuthMessage - 10, // 3: client.SendMessage.emptyArr:type_name -> messages.EmptyArr - 9, // 4: client.AckMessagePayload.authData:type_name -> messages.AuthMessage - 10, // 5: client.AckMessagePayload.emptyArr:type_name -> messages.EmptyArr - 7, // 6: client.AckMessageData.device:type_name -> messages.Device - 3, // 7: client.UploadImagePayload.metaData:type_name -> client.ImageMetaData - 9, // 8: client.UploadImagePayload.authData:type_name -> messages.AuthMessage - 6, // 9: client.BugleBackendService.data:type_name -> client.BugleCode - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 4, // 0: client.AckMessageResponse.container:type_name -> client.AckContainer + 5, // 1: client.AckContainer.data:type_name -> client.AckData + 6, // 2: client.AckData.ackAmount:type_name -> client.AckAmount + 13, // 3: client.AckMessagePayload.authData:type_name -> messages.AuthMessage + 14, // 4: client.AckMessagePayload.emptyArr:type_name -> messages.EmptyArr + 15, // 5: client.AckMessageData.device:type_name -> messages.Device + 9, // 6: client.UploadImagePayload.metaData:type_name -> client.ImageMetaData + 13, // 7: client.UploadImagePayload.authData:type_name -> messages.AuthMessage + 12, // 8: client.BugleBackendService.data:type_name -> client.BugleCode + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_client_proto_init() } @@ -531,7 +867,7 @@ func file_client_proto_init() { file_messages_proto_init() if !protoimpl.UnsafeEnabled { file_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendMessage); i { + switch v := v.(*NotifyDittoActivityPayload); i { case 0: return &v.state case 1: @@ -543,7 +879,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AckMessagePayload); i { + switch v := v.(*AckMessageResponse); i { case 0: return &v.state case 1: @@ -555,7 +891,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AckMessageData); i { + switch v := v.(*AckContainer); i { case 0: return &v.state case 1: @@ -567,7 +903,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImageMetaData); i { + switch v := v.(*AckData); i { case 0: return &v.state case 1: @@ -579,7 +915,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UploadImagePayload); i { + switch v := v.(*AckAmount); i { case 0: return &v.state case 1: @@ -591,7 +927,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BugleBackendService); i { + switch v := v.(*AckMessagePayload); i { case 0: return &v.state case 1: @@ -603,6 +939,54 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AckMessageData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageMetaData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UploadImagePayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BugleBackendService); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BugleCode); i { case 0: return &v.state @@ -620,13 +1004,14 @@ func file_client_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_client_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, + NumEnums: 2, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, GoTypes: file_client_proto_goTypes, DependencyIndexes: file_client_proto_depIdxs, + EnumInfos: file_client_proto_enumTypes, MessageInfos: file_client_proto_msgTypes, }.Build() File_client_proto = out.File diff --git a/libgm/binary/conversations.pb.go b/libgm/binary/conversations.pb.go index 3556cdf..a39b9a1 100644 --- a/libgm/binary/conversations.pb.go +++ b/libgm/binary/conversations.pb.go @@ -20,131 +20,961 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type MessageType int32 +type MessageStatusType int32 const ( - MessageType_UNKNOWN MessageType = 0 - MessageType_TEXT MessageType = 1 - MessageType_IMAGE MessageType = 2 - MessageType_VIDEO MessageType = 3 - MessageType_AUDIO MessageType = 4 - MessageType_ATTACHMENT MessageType = 5 - MessageType_LOCATION MessageType = 6 - MessageType_RICH_CARD MessageType = 7 - MessageType_VCARD MessageType = 8 - MessageType_MMS_NEEDS_DOWNLOAD MessageType = 9 - MessageType_REPLY MessageType = 10 + MessageStatusType_STATUS_UNKNOWN MessageStatusType = 0 + MessageStatusType_OUTGOING_COMPLETE MessageStatusType = 1 + MessageStatusType_OUTGOING_DELIVERED MessageStatusType = 2 + MessageStatusType_OUTGOING_DISPLAYED MessageStatusType = 11 + MessageStatusType_OUTGOING_DRAFT MessageStatusType = 3 + MessageStatusType_OUTGOING_SEND_AFTER_PROCESSING MessageStatusType = 10 + MessageStatusType_OUTGOING_YET_TO_SEND MessageStatusType = 4 + MessageStatusType_OUTGOING_SENDING MessageStatusType = 5 + MessageStatusType_OUTGOING_RESENDING MessageStatusType = 6 + MessageStatusType_OUTGOING_AWAITING_RETRY MessageStatusType = 7 + MessageStatusType_OUTGOING_FAILED_GENERIC MessageStatusType = 8 + MessageStatusType_OUTGOING_FAILED_EMERGENCY_NUMBER MessageStatusType = 9 + MessageStatusType_OUTGOING_CANCELED MessageStatusType = 12 + MessageStatusType_OUTGOING_FAILED_TOO_LARGE MessageStatusType = 13 + MessageStatusType_OUTGOING_NOT_DELIVERED_YET MessageStatusType = 14 + MessageStatusType_OUTGOING_REVOCATION_PENDING MessageStatusType = 15 + MessageStatusType_OUTGOING_SCHEDULED MessageStatusType = 16 + MessageStatusType_OUTGOING_FAILED_RECIPIENT_LOST_RCS MessageStatusType = 17 + MessageStatusType_OUTGOING_FAILED_NO_RETRY_NO_FALLBACK MessageStatusType = 18 + MessageStatusType_OUTGOING_FAILED_RECIPIENT_DID_NOT_DECRYPT MessageStatusType = 19 + MessageStatusType_OUTGOING_VALIDATING MessageStatusType = 20 + MessageStatusType_OUTGOING_FAILED_RECIPIENT_LOST_ENCRYPTION MessageStatusType = 21 + MessageStatusType_OUTGOING_FAILED_RECIPIENT_DID_NOT_DECRYPT_NO_MORE_RETRY MessageStatusType = 22 + MessageStatusType_INCOMING_COMPLETE MessageStatusType = 100 + MessageStatusType_INCOMING_YET_TO_MANUAL_DOWNLOAD MessageStatusType = 101 + MessageStatusType_INCOMING_RETRYING_MANUAL_DOWNLOAD MessageStatusType = 102 + MessageStatusType_INCOMING_MANUAL_DOWNLOADING MessageStatusType = 103 + MessageStatusType_INCOMING_RETRYING_AUTO_DOWNLOAD MessageStatusType = 104 + MessageStatusType_INCOMING_AUTO_DOWNLOADING MessageStatusType = 105 + MessageStatusType_INCOMING_DOWNLOAD_FAILED MessageStatusType = 106 + MessageStatusType_INCOMING_EXPIRED_OR_NOT_AVAILABLE MessageStatusType = 107 + MessageStatusType_INCOMING_DELIVERED MessageStatusType = 108 + MessageStatusType_INCOMING_DISPLAYED MessageStatusType = 109 + MessageStatusType_INCOMING_DOWNLOAD_CANCELED MessageStatusType = 110 + MessageStatusType_INCOMING_DOWNLOAD_FAILED_TOO_LARGE MessageStatusType = 111 + MessageStatusType_INCOMING_DOWNLOAD_FAILED_SIM_HAS_NO_DATA MessageStatusType = 112 + MessageStatusType_INCOMING_FAILED_TO_DECRYPT MessageStatusType = 113 + MessageStatusType_INCOMING_DECRYPTION_ABORTED MessageStatusType = 114 + // TOMBSTONE_PARTICIPANT_JOINED = BasePaymentResult.ERROR_REQUEST_FAILED; + // TOMBSTONE_PARTICIPANT_LEFT = BasePaymentResult.ERROR_REQUEST_TIMEOUT; + // TOMBSTONE_SELF_LEFT = BasePaymentResult.ERROR_REQUEST_CONNECTION_FAILED; + // TOMBSTONE_RCS_GROUP_CREATED = BasePaymentResult.ERROR_BOT_DOMAIN_NOT_WHITELISTED; + MessageStatusType_TOMBSTONE_MMS_GROUP_CREATED MessageStatusType = 204 + MessageStatusType_TOMBSTONE_SMS_BROADCAST_CREATED MessageStatusType = 205 + MessageStatusType_TOMBSTONE_ONE_ON_ONE_SMS_CREATED MessageStatusType = 206 + MessageStatusType_TOMBSTONE_ONE_ON_ONE_RCS_CREATED MessageStatusType = 207 + MessageStatusType_TOMBSTONE_SWITCH_TO_GROUP_MMS MessageStatusType = 208 + MessageStatusType_TOMBSTONE_SWITCH_TO_BROADCAST_SMS MessageStatusType = 209 + MessageStatusType_TOMBSTONE_SHOW_LINK_PREVIEWS MessageStatusType = 210 + MessageStatusType_TOMBSTONE_GROUP_RENAMED_LOCAL MessageStatusType = 211 + MessageStatusType_TOMBSTONE_VERIFIED_SMS_APPLICABLE MessageStatusType = 212 + MessageStatusType_TOMBSTONE_ENCRYPTED_ONE_ON_ONE_RCS_CREATED MessageStatusType = 213 + MessageStatusType_TOMBSTONE_PROTOCOL_SWITCH_TO_TEXT MessageStatusType = 214 + MessageStatusType_TOMBSTONE_PROTOCOL_SWITCH_TO_RCS MessageStatusType = 215 + MessageStatusType_TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS MessageStatusType = 216 + MessageStatusType_TOMBSTONE_GROUP_RENAMED_GLOBAL MessageStatusType = 217 + MessageStatusType_TOMBSTONE_GROUP_NAME_CLEARED_GLOBAL MessageStatusType = 218 + MessageStatusType_TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS_INFO MessageStatusType = 219 + MessageStatusType_TOMBSTONE_SELF_REMOVED_FROM_GROUP MessageStatusType = 220 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_PARTICIPANT_REMOVED_FROM_GROUP MessageStatusType = 221 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_SMS_NORM_PARTICIPANT_UPGRADED MessageStatusType = 222 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_RCS_NORM_PARTICIPANT_UPGRADED MessageStatusType = 223 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_RCS_NORM_PARTICIPANT_UPGRADED MessageStatusType = 224 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_JOINED MessageStatusType = 225 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_JOINED_INFO MessageStatusType = 226 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_LEFT MessageStatusType = 227 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_SELF_LEFT MessageStatusType = 228 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_CREATED MessageStatusType = 229 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_SELF_REMOVED_FROM_ENCRYPTED_GROUP MessageStatusType = 230 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_PARTICIPANT_REMOVED_FROM_ENCRYPTED_GROUP MessageStatusType = 231 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_SUGGESTION_SHORTCUT_STAR_TOOLSTONE MessageStatusType = 232 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_GROUP_PROTOCOL_SWITCH_RCS_TO_E2EE MessageStatusType = 233 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_GROUP_PROTOCOL_SWITCH_E2EE_TO_RCS MessageStatusType = 234 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_TEXT_TO_E2EE MessageStatusType = 235 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_E2EE_TO_TEXT MessageStatusType = 236 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_RCS_TO_E2EE MessageStatusType = 237 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_E2EE_TO_RCS MessageStatusType = 238 + MessageStatusType_MESSAGE_STATUS_TOMBSTONE_SATELLITE_EDUCATION MessageStatusType = 239 + MessageStatusType_MESSAGE_DELETED MessageStatusType = 300 ) -// Enum value maps for MessageType. +// Enum value maps for MessageStatusType. var ( - MessageType_name = map[int32]string{ - 0: "UNKNOWN", - 1: "TEXT", - 2: "IMAGE", - 3: "VIDEO", - 4: "AUDIO", - 5: "ATTACHMENT", - 6: "LOCATION", - 7: "RICH_CARD", - 8: "VCARD", - 9: "MMS_NEEDS_DOWNLOAD", - 10: "REPLY", + MessageStatusType_name = map[int32]string{ + 0: "STATUS_UNKNOWN", + 1: "OUTGOING_COMPLETE", + 2: "OUTGOING_DELIVERED", + 11: "OUTGOING_DISPLAYED", + 3: "OUTGOING_DRAFT", + 10: "OUTGOING_SEND_AFTER_PROCESSING", + 4: "OUTGOING_YET_TO_SEND", + 5: "OUTGOING_SENDING", + 6: "OUTGOING_RESENDING", + 7: "OUTGOING_AWAITING_RETRY", + 8: "OUTGOING_FAILED_GENERIC", + 9: "OUTGOING_FAILED_EMERGENCY_NUMBER", + 12: "OUTGOING_CANCELED", + 13: "OUTGOING_FAILED_TOO_LARGE", + 14: "OUTGOING_NOT_DELIVERED_YET", + 15: "OUTGOING_REVOCATION_PENDING", + 16: "OUTGOING_SCHEDULED", + 17: "OUTGOING_FAILED_RECIPIENT_LOST_RCS", + 18: "OUTGOING_FAILED_NO_RETRY_NO_FALLBACK", + 19: "OUTGOING_FAILED_RECIPIENT_DID_NOT_DECRYPT", + 20: "OUTGOING_VALIDATING", + 21: "OUTGOING_FAILED_RECIPIENT_LOST_ENCRYPTION", + 22: "OUTGOING_FAILED_RECIPIENT_DID_NOT_DECRYPT_NO_MORE_RETRY", + 100: "INCOMING_COMPLETE", + 101: "INCOMING_YET_TO_MANUAL_DOWNLOAD", + 102: "INCOMING_RETRYING_MANUAL_DOWNLOAD", + 103: "INCOMING_MANUAL_DOWNLOADING", + 104: "INCOMING_RETRYING_AUTO_DOWNLOAD", + 105: "INCOMING_AUTO_DOWNLOADING", + 106: "INCOMING_DOWNLOAD_FAILED", + 107: "INCOMING_EXPIRED_OR_NOT_AVAILABLE", + 108: "INCOMING_DELIVERED", + 109: "INCOMING_DISPLAYED", + 110: "INCOMING_DOWNLOAD_CANCELED", + 111: "INCOMING_DOWNLOAD_FAILED_TOO_LARGE", + 112: "INCOMING_DOWNLOAD_FAILED_SIM_HAS_NO_DATA", + 113: "INCOMING_FAILED_TO_DECRYPT", + 114: "INCOMING_DECRYPTION_ABORTED", + 204: "TOMBSTONE_MMS_GROUP_CREATED", + 205: "TOMBSTONE_SMS_BROADCAST_CREATED", + 206: "TOMBSTONE_ONE_ON_ONE_SMS_CREATED", + 207: "TOMBSTONE_ONE_ON_ONE_RCS_CREATED", + 208: "TOMBSTONE_SWITCH_TO_GROUP_MMS", + 209: "TOMBSTONE_SWITCH_TO_BROADCAST_SMS", + 210: "TOMBSTONE_SHOW_LINK_PREVIEWS", + 211: "TOMBSTONE_GROUP_RENAMED_LOCAL", + 212: "TOMBSTONE_VERIFIED_SMS_APPLICABLE", + 213: "TOMBSTONE_ENCRYPTED_ONE_ON_ONE_RCS_CREATED", + 214: "TOMBSTONE_PROTOCOL_SWITCH_TO_TEXT", + 215: "TOMBSTONE_PROTOCOL_SWITCH_TO_RCS", + 216: "TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS", + 217: "TOMBSTONE_GROUP_RENAMED_GLOBAL", + 218: "TOMBSTONE_GROUP_NAME_CLEARED_GLOBAL", + 219: "TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS_INFO", + 220: "TOMBSTONE_SELF_REMOVED_FROM_GROUP", + 221: "MESSAGE_STATUS_TOMBSTONE_PARTICIPANT_REMOVED_FROM_GROUP", + 222: "MESSAGE_STATUS_TOMBSTONE_SMS_NORM_PARTICIPANT_UPGRADED", + 223: "MESSAGE_STATUS_TOMBSTONE_RCS_NORM_PARTICIPANT_UPGRADED", + 224: "MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_RCS_NORM_PARTICIPANT_UPGRADED", + 225: "MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_JOINED", + 226: "MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_JOINED_INFO", + 227: "MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_LEFT", + 228: "MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_SELF_LEFT", + 229: "MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_CREATED", + 230: "MESSAGE_STATUS_TOMBSTONE_SELF_REMOVED_FROM_ENCRYPTED_GROUP", + 231: "MESSAGE_STATUS_TOMBSTONE_PARTICIPANT_REMOVED_FROM_ENCRYPTED_GROUP", + 232: "MESSAGE_STATUS_TOMBSTONE_SUGGESTION_SHORTCUT_STAR_TOOLSTONE", + 233: "MESSAGE_STATUS_TOMBSTONE_GROUP_PROTOCOL_SWITCH_RCS_TO_E2EE", + 234: "MESSAGE_STATUS_TOMBSTONE_GROUP_PROTOCOL_SWITCH_E2EE_TO_RCS", + 235: "MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_TEXT_TO_E2EE", + 236: "MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_E2EE_TO_TEXT", + 237: "MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_RCS_TO_E2EE", + 238: "MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_E2EE_TO_RCS", + 239: "MESSAGE_STATUS_TOMBSTONE_SATELLITE_EDUCATION", + 300: "MESSAGE_DELETED", } - MessageType_value = map[string]int32{ - "UNKNOWN": 0, - "TEXT": 1, - "IMAGE": 2, - "VIDEO": 3, - "AUDIO": 4, - "ATTACHMENT": 5, - "LOCATION": 6, - "RICH_CARD": 7, - "VCARD": 8, - "MMS_NEEDS_DOWNLOAD": 9, - "REPLY": 10, + MessageStatusType_value = map[string]int32{ + "STATUS_UNKNOWN": 0, + "OUTGOING_COMPLETE": 1, + "OUTGOING_DELIVERED": 2, + "OUTGOING_DISPLAYED": 11, + "OUTGOING_DRAFT": 3, + "OUTGOING_SEND_AFTER_PROCESSING": 10, + "OUTGOING_YET_TO_SEND": 4, + "OUTGOING_SENDING": 5, + "OUTGOING_RESENDING": 6, + "OUTGOING_AWAITING_RETRY": 7, + "OUTGOING_FAILED_GENERIC": 8, + "OUTGOING_FAILED_EMERGENCY_NUMBER": 9, + "OUTGOING_CANCELED": 12, + "OUTGOING_FAILED_TOO_LARGE": 13, + "OUTGOING_NOT_DELIVERED_YET": 14, + "OUTGOING_REVOCATION_PENDING": 15, + "OUTGOING_SCHEDULED": 16, + "OUTGOING_FAILED_RECIPIENT_LOST_RCS": 17, + "OUTGOING_FAILED_NO_RETRY_NO_FALLBACK": 18, + "OUTGOING_FAILED_RECIPIENT_DID_NOT_DECRYPT": 19, + "OUTGOING_VALIDATING": 20, + "OUTGOING_FAILED_RECIPIENT_LOST_ENCRYPTION": 21, + "OUTGOING_FAILED_RECIPIENT_DID_NOT_DECRYPT_NO_MORE_RETRY": 22, + "INCOMING_COMPLETE": 100, + "INCOMING_YET_TO_MANUAL_DOWNLOAD": 101, + "INCOMING_RETRYING_MANUAL_DOWNLOAD": 102, + "INCOMING_MANUAL_DOWNLOADING": 103, + "INCOMING_RETRYING_AUTO_DOWNLOAD": 104, + "INCOMING_AUTO_DOWNLOADING": 105, + "INCOMING_DOWNLOAD_FAILED": 106, + "INCOMING_EXPIRED_OR_NOT_AVAILABLE": 107, + "INCOMING_DELIVERED": 108, + "INCOMING_DISPLAYED": 109, + "INCOMING_DOWNLOAD_CANCELED": 110, + "INCOMING_DOWNLOAD_FAILED_TOO_LARGE": 111, + "INCOMING_DOWNLOAD_FAILED_SIM_HAS_NO_DATA": 112, + "INCOMING_FAILED_TO_DECRYPT": 113, + "INCOMING_DECRYPTION_ABORTED": 114, + "TOMBSTONE_MMS_GROUP_CREATED": 204, + "TOMBSTONE_SMS_BROADCAST_CREATED": 205, + "TOMBSTONE_ONE_ON_ONE_SMS_CREATED": 206, + "TOMBSTONE_ONE_ON_ONE_RCS_CREATED": 207, + "TOMBSTONE_SWITCH_TO_GROUP_MMS": 208, + "TOMBSTONE_SWITCH_TO_BROADCAST_SMS": 209, + "TOMBSTONE_SHOW_LINK_PREVIEWS": 210, + "TOMBSTONE_GROUP_RENAMED_LOCAL": 211, + "TOMBSTONE_VERIFIED_SMS_APPLICABLE": 212, + "TOMBSTONE_ENCRYPTED_ONE_ON_ONE_RCS_CREATED": 213, + "TOMBSTONE_PROTOCOL_SWITCH_TO_TEXT": 214, + "TOMBSTONE_PROTOCOL_SWITCH_TO_RCS": 215, + "TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS": 216, + "TOMBSTONE_GROUP_RENAMED_GLOBAL": 217, + "TOMBSTONE_GROUP_NAME_CLEARED_GLOBAL": 218, + "TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS_INFO": 219, + "TOMBSTONE_SELF_REMOVED_FROM_GROUP": 220, + "MESSAGE_STATUS_TOMBSTONE_PARTICIPANT_REMOVED_FROM_GROUP": 221, + "MESSAGE_STATUS_TOMBSTONE_SMS_NORM_PARTICIPANT_UPGRADED": 222, + "MESSAGE_STATUS_TOMBSTONE_RCS_NORM_PARTICIPANT_UPGRADED": 223, + "MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_RCS_NORM_PARTICIPANT_UPGRADED": 224, + "MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_JOINED": 225, + "MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_JOINED_INFO": 226, + "MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_LEFT": 227, + "MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_SELF_LEFT": 228, + "MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_CREATED": 229, + "MESSAGE_STATUS_TOMBSTONE_SELF_REMOVED_FROM_ENCRYPTED_GROUP": 230, + "MESSAGE_STATUS_TOMBSTONE_PARTICIPANT_REMOVED_FROM_ENCRYPTED_GROUP": 231, + "MESSAGE_STATUS_TOMBSTONE_SUGGESTION_SHORTCUT_STAR_TOOLSTONE": 232, + "MESSAGE_STATUS_TOMBSTONE_GROUP_PROTOCOL_SWITCH_RCS_TO_E2EE": 233, + "MESSAGE_STATUS_TOMBSTONE_GROUP_PROTOCOL_SWITCH_E2EE_TO_RCS": 234, + "MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_TEXT_TO_E2EE": 235, + "MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_E2EE_TO_TEXT": 236, + "MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_RCS_TO_E2EE": 237, + "MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_E2EE_TO_RCS": 238, + "MESSAGE_STATUS_TOMBSTONE_SATELLITE_EDUCATION": 239, + "MESSAGE_DELETED": 300, } ) -func (x MessageType) Enum() *MessageType { - p := new(MessageType) +func (x MessageStatusType) Enum() *MessageStatusType { + p := new(MessageStatusType) *p = x return p } -func (x MessageType) String() string { +func (x MessageStatusType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (MessageType) Descriptor() protoreflect.EnumDescriptor { +func (MessageStatusType) Descriptor() protoreflect.EnumDescriptor { return file_conversations_proto_enumTypes[0].Descriptor() } -func (MessageType) Type() protoreflect.EnumType { +func (MessageStatusType) Type() protoreflect.EnumType { return &file_conversations_proto_enumTypes[0] } -func (x MessageType) Number() protoreflect.EnumNumber { +func (x MessageStatusType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use MessageType.Descriptor instead. -func (MessageType) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use MessageStatusType.Descriptor instead. +func (MessageStatusType) EnumDescriptor() ([]byte, []int) { return file_conversations_proto_rawDescGZIP(), []int{0} } -type MsgStatusCode int32 +type ConversationStatus int32 const ( - MsgStatusCode_UNKNOWN_STATUS MsgStatusCode = 0 - MsgStatusCode_SENT MsgStatusCode = 1 - MsgStatusCode_SENDING MsgStatusCode = 5 - MsgStatusCode_READ MsgStatusCode = 11 + ConversationStatus_UNKNOWN_STATUS ConversationStatus = 0 + ConversationStatus_UNARCHIVE ConversationStatus = 1 + ConversationStatus_ARCHIVE ConversationStatus = 2 + ConversationStatus_DELETE ConversationStatus = 3 ) -// Enum value maps for MsgStatusCode. +// Enum value maps for ConversationStatus. var ( - MsgStatusCode_name = map[int32]string{ - 0: "UNKNOWN_STATUS", - 1: "SENT", - 5: "SENDING", - 11: "READ", + ConversationStatus_name = map[int32]string{ + 0: "UNKNOWN_STATUS", + 1: "UNARCHIVE", + 2: "ARCHIVE", + 3: "DELETE", } - MsgStatusCode_value = map[string]int32{ + ConversationStatus_value = map[string]int32{ "UNKNOWN_STATUS": 0, - "SENT": 1, - "SENDING": 5, - "READ": 11, + "UNARCHIVE": 1, + "ARCHIVE": 2, + "DELETE": 3, } ) -func (x MsgStatusCode) Enum() *MsgStatusCode { - p := new(MsgStatusCode) +func (x ConversationStatus) Enum() *ConversationStatus { + p := new(ConversationStatus) *p = x return p } -func (x MsgStatusCode) String() string { +func (x ConversationStatus) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (MsgStatusCode) Descriptor() protoreflect.EnumDescriptor { +func (ConversationStatus) Descriptor() protoreflect.EnumDescriptor { return file_conversations_proto_enumTypes[1].Descriptor() } -func (MsgStatusCode) Type() protoreflect.EnumType { +func (ConversationStatus) Type() protoreflect.EnumType { return &file_conversations_proto_enumTypes[1] } -func (x MsgStatusCode) Number() protoreflect.EnumNumber { +func (x ConversationStatus) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use MsgStatusCode.Descriptor instead. -func (MsgStatusCode) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use ConversationStatus.Descriptor instead. +func (ConversationStatus) EnumDescriptor() ([]byte, []int) { return file_conversations_proto_rawDescGZIP(), []int{1} } +type ConversationActionStatus int32 + +const ( + ConversationActionStatus_UNKNOWN_ACTION_STATUS ConversationActionStatus = 0 + ConversationActionStatus_UNBLOCK ConversationActionStatus = 2 + ConversationActionStatus_BLOCK ConversationActionStatus = 7 + ConversationActionStatus_BLOCK_AND_REPORT ConversationActionStatus = 8 +) + +// Enum value maps for ConversationActionStatus. +var ( + ConversationActionStatus_name = map[int32]string{ + 0: "UNKNOWN_ACTION_STATUS", + 2: "UNBLOCK", + 7: "BLOCK", + 8: "BLOCK_AND_REPORT", + } + ConversationActionStatus_value = map[string]int32{ + "UNKNOWN_ACTION_STATUS": 0, + "UNBLOCK": 2, + "BLOCK": 7, + "BLOCK_AND_REPORT": 8, + } +) + +func (x ConversationActionStatus) Enum() *ConversationActionStatus { + p := new(ConversationActionStatus) + *p = x + return p +} + +func (x ConversationActionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConversationActionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_conversations_proto_enumTypes[2].Descriptor() +} + +func (ConversationActionStatus) Type() protoreflect.EnumType { + return &file_conversations_proto_enumTypes[2] +} + +func (x ConversationActionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConversationActionStatus.Descriptor instead. +func (ConversationActionStatus) EnumDescriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{2} +} + +type ConversationMuteStatus int32 + +const ( + ConversationMuteStatus_UNMUTE ConversationMuteStatus = 0 + ConversationMuteStatus_MUTE ConversationMuteStatus = 1 +) + +// Enum value maps for ConversationMuteStatus. +var ( + ConversationMuteStatus_name = map[int32]string{ + 0: "UNMUTE", + 1: "MUTE", + } + ConversationMuteStatus_value = map[string]int32{ + "UNMUTE": 0, + "MUTE": 1, + } +) + +func (x ConversationMuteStatus) Enum() *ConversationMuteStatus { + p := new(ConversationMuteStatus) + *p = x + return p +} + +func (x ConversationMuteStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConversationMuteStatus) Descriptor() protoreflect.EnumDescriptor { + return file_conversations_proto_enumTypes[3].Descriptor() +} + +func (ConversationMuteStatus) Type() protoreflect.EnumType { + return &file_conversations_proto_enumTypes[3] +} + +func (x ConversationMuteStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConversationMuteStatus.Descriptor instead. +func (ConversationMuteStatus) EnumDescriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{3} +} + +type ConvUpdateTypes int32 + +const ( + ConvUpdateTypes_UNKNOWN_CONVTYPE ConvUpdateTypes = 0 + ConvUpdateTypes_UNARCHIVED ConvUpdateTypes = 1 + ConvUpdateTypes_ARCHIVED ConvUpdateTypes = 2 + ConvUpdateTypes_DELETED ConvUpdateTypes = 3 + ConvUpdateTypes_BLOCKED_AND_REPORTED ConvUpdateTypes = 5 + ConvUpdateTypes_BLOCKED ConvUpdateTypes = 6 +) + +// Enum value maps for ConvUpdateTypes. +var ( + ConvUpdateTypes_name = map[int32]string{ + 0: "UNKNOWN_CONVTYPE", + 1: "UNARCHIVED", + 2: "ARCHIVED", + 3: "DELETED", + 5: "BLOCKED_AND_REPORTED", + 6: "BLOCKED", + } + ConvUpdateTypes_value = map[string]int32{ + "UNKNOWN_CONVTYPE": 0, + "UNARCHIVED": 1, + "ARCHIVED": 2, + "DELETED": 3, + "BLOCKED_AND_REPORTED": 5, + "BLOCKED": 6, + } +) + +func (x ConvUpdateTypes) Enum() *ConvUpdateTypes { + p := new(ConvUpdateTypes) + *p = x + return p +} + +func (x ConvUpdateTypes) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConvUpdateTypes) Descriptor() protoreflect.EnumDescriptor { + return file_conversations_proto_enumTypes[4].Descriptor() +} + +func (ConvUpdateTypes) Type() protoreflect.EnumType { + return &file_conversations_proto_enumTypes[4] +} + +func (x ConvUpdateTypes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConvUpdateTypes.Descriptor instead. +func (ConvUpdateTypes) EnumDescriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{4} +} + +type MediaFormats int32 + +const ( + MediaFormats_UNSPECIFIED_TYPE MediaFormats = 0 + MediaFormats_IMAGE_JPEG MediaFormats = 1 + MediaFormats_IMAGE_JPG MediaFormats = 2 + MediaFormats_IMAGE_PNG MediaFormats = 3 + MediaFormats_IMAGE_GIF MediaFormats = 4 + MediaFormats_IMAGE_WBMP MediaFormats = 5 + MediaFormats_IMAGE_X_MS_BMP MediaFormats = 6 + MediaFormats_IMAGE_UNSPECIFIED MediaFormats = 7 + MediaFormats_VIDEO_MP4 MediaFormats = 8 + MediaFormats_VIDEO_3G2 MediaFormats = 9 + MediaFormats_VIDEO_3GPP MediaFormats = 10 + MediaFormats_VIDEO_WEBM MediaFormats = 11 + MediaFormats_VIDEO_MKV MediaFormats = 12 + MediaFormats_VIDEO_UNSPECIFIED MediaFormats = 13 + MediaFormats_AUDIO_AAC MediaFormats = 14 + MediaFormats_AUDIO_AMR MediaFormats = 15 + MediaFormats_AUDIO_MP3 MediaFormats = 16 + MediaFormats_AUDIO_MPEG MediaFormats = 17 + MediaFormats_AUDIO_MPG MediaFormats = 18 + MediaFormats_AUDIO_MP4 MediaFormats = 19 + MediaFormats_AUDIO_MP4_LATM MediaFormats = 20 + MediaFormats_AUDIO_3GPP MediaFormats = 21 + MediaFormats_AUDIO_OGG MediaFormats = 22 + MediaFormats_AUDIO_UNSPECIFIED MediaFormats = 23 + MediaFormats_TEXT_VCARD MediaFormats = 24 + MediaFormats_APP_PDF MediaFormats = 28 + MediaFormats_APP_TXT MediaFormats = 29 + MediaFormats_APP_HTML MediaFormats = 30 + MediaFormats_AUDIO_OGG2 MediaFormats = 31 + MediaFormats_APP_SMIL MediaFormats = 32 +) + +// Enum value maps for MediaFormats. +var ( + MediaFormats_name = map[int32]string{ + 0: "UNSPECIFIED_TYPE", + 1: "IMAGE_JPEG", + 2: "IMAGE_JPG", + 3: "IMAGE_PNG", + 4: "IMAGE_GIF", + 5: "IMAGE_WBMP", + 6: "IMAGE_X_MS_BMP", + 7: "IMAGE_UNSPECIFIED", + 8: "VIDEO_MP4", + 9: "VIDEO_3G2", + 10: "VIDEO_3GPP", + 11: "VIDEO_WEBM", + 12: "VIDEO_MKV", + 13: "VIDEO_UNSPECIFIED", + 14: "AUDIO_AAC", + 15: "AUDIO_AMR", + 16: "AUDIO_MP3", + 17: "AUDIO_MPEG", + 18: "AUDIO_MPG", + 19: "AUDIO_MP4", + 20: "AUDIO_MP4_LATM", + 21: "AUDIO_3GPP", + 22: "AUDIO_OGG", + 23: "AUDIO_UNSPECIFIED", + 24: "TEXT_VCARD", + 28: "APP_PDF", + 29: "APP_TXT", + 30: "APP_HTML", + 31: "AUDIO_OGG2", + 32: "APP_SMIL", + } + MediaFormats_value = map[string]int32{ + "UNSPECIFIED_TYPE": 0, + "IMAGE_JPEG": 1, + "IMAGE_JPG": 2, + "IMAGE_PNG": 3, + "IMAGE_GIF": 4, + "IMAGE_WBMP": 5, + "IMAGE_X_MS_BMP": 6, + "IMAGE_UNSPECIFIED": 7, + "VIDEO_MP4": 8, + "VIDEO_3G2": 9, + "VIDEO_3GPP": 10, + "VIDEO_WEBM": 11, + "VIDEO_MKV": 12, + "VIDEO_UNSPECIFIED": 13, + "AUDIO_AAC": 14, + "AUDIO_AMR": 15, + "AUDIO_MP3": 16, + "AUDIO_MPEG": 17, + "AUDIO_MPG": 18, + "AUDIO_MP4": 19, + "AUDIO_MP4_LATM": 20, + "AUDIO_3GPP": 21, + "AUDIO_OGG": 22, + "AUDIO_UNSPECIFIED": 23, + "TEXT_VCARD": 24, + "APP_PDF": 28, + "APP_TXT": 29, + "APP_HTML": 30, + "AUDIO_OGG2": 31, + "APP_SMIL": 32, + } +) + +func (x MediaFormats) Enum() *MediaFormats { + p := new(MediaFormats) + *p = x + return p +} + +func (x MediaFormats) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MediaFormats) Descriptor() protoreflect.EnumDescriptor { + return file_conversations_proto_enumTypes[5].Descriptor() +} + +func (MediaFormats) Type() protoreflect.EnumType { + return &file_conversations_proto_enumTypes[5] +} + +func (x MediaFormats) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MediaFormats.Descriptor instead. +func (MediaFormats) EnumDescriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{5} +} + +type ResendMessagePayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageID string `protobuf:"bytes,2,opt,name=messageID,proto3" json:"messageID,omitempty"` +} + +func (x *ResendMessagePayload) Reset() { + *x = ResendMessagePayload{} + if protoimpl.UnsafeEnabled { + mi := &file_conversations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResendMessagePayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResendMessagePayload) ProtoMessage() {} + +func (x *ResendMessagePayload) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResendMessagePayload.ProtoReflect.Descriptor instead. +func (*ResendMessagePayload) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{0} +} + +func (x *ResendMessagePayload) GetMessageID() string { + if x != nil { + return x.MessageID + } + return "" +} + +type ConversationTypePayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID,omitempty"` +} + +func (x *ConversationTypePayload) Reset() { + *x = ConversationTypePayload{} + if protoimpl.UnsafeEnabled { + mi := &file_conversations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConversationTypePayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConversationTypePayload) ProtoMessage() {} + +func (x *ConversationTypePayload) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConversationTypePayload.ProtoReflect.Descriptor instead. +func (*ConversationTypePayload) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{1} +} + +func (x *ConversationTypePayload) GetConversationID() string { + if x != nil { + return x.ConversationID + } + return "" +} + +type UpdateConversationPayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *UpdateConversationData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Action ConversationActionStatus `protobuf:"varint,2,opt,name=action,proto3,enum=conversations.ConversationActionStatus" json:"action,omitempty"` + ConversationID string `protobuf:"bytes,3,opt,name=conversationID,proto3" json:"conversationID,omitempty"` + Action5 *ConversationAction5 `protobuf:"bytes,5,opt,name=action5,proto3" json:"action5,omitempty"` +} + +func (x *UpdateConversationPayload) Reset() { + *x = UpdateConversationPayload{} + if protoimpl.UnsafeEnabled { + mi := &file_conversations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateConversationPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateConversationPayload) ProtoMessage() {} + +func (x *UpdateConversationPayload) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateConversationPayload.ProtoReflect.Descriptor instead. +func (*UpdateConversationPayload) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{2} +} + +func (x *UpdateConversationPayload) GetData() *UpdateConversationData { + if x != nil { + return x.Data + } + return nil +} + +func (x *UpdateConversationPayload) GetAction() ConversationActionStatus { + if x != nil { + return x.Action + } + return ConversationActionStatus_UNKNOWN_ACTION_STATUS +} + +func (x *UpdateConversationPayload) GetConversationID() string { + if x != nil { + return x.ConversationID + } + return "" +} + +func (x *UpdateConversationPayload) GetAction5() *ConversationAction5 { + if x != nil { + return x.Action5 + } + return nil +} + +type ConversationAction5 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Field2 bool `protobuf:"varint,2,opt,name=field2,proto3" json:"field2,omitempty"` +} + +func (x *ConversationAction5) Reset() { + *x = ConversationAction5{} + if protoimpl.UnsafeEnabled { + mi := &file_conversations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConversationAction5) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConversationAction5) ProtoMessage() {} + +func (x *ConversationAction5) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConversationAction5.ProtoReflect.Descriptor instead. +func (*ConversationAction5) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{3} +} + +func (x *ConversationAction5) GetField2() bool { + if x != nil { + return x.Field2 + } + return false +} + +type UpdateConversationData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID,omitempty"` + // Types that are assignable to Data: + // + // *UpdateConversationData_Status + // *UpdateConversationData_Mute + Data isUpdateConversationData_Data `protobuf_oneof:"data"` +} + +func (x *UpdateConversationData) Reset() { + *x = UpdateConversationData{} + if protoimpl.UnsafeEnabled { + mi := &file_conversations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateConversationData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateConversationData) ProtoMessage() {} + +func (x *UpdateConversationData) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateConversationData.ProtoReflect.Descriptor instead. +func (*UpdateConversationData) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateConversationData) GetConversationID() string { + if x != nil { + return x.ConversationID + } + return "" +} + +func (m *UpdateConversationData) GetData() isUpdateConversationData_Data { + if m != nil { + return m.Data + } + return nil +} + +func (x *UpdateConversationData) GetStatus() ConversationStatus { + if x, ok := x.GetData().(*UpdateConversationData_Status); ok { + return x.Status + } + return ConversationStatus_UNKNOWN_STATUS +} + +func (x *UpdateConversationData) GetMute() ConversationMuteStatus { + if x, ok := x.GetData().(*UpdateConversationData_Mute); ok { + return x.Mute + } + return ConversationMuteStatus_UNMUTE +} + +type isUpdateConversationData_Data interface { + isUpdateConversationData_Data() +} + +type UpdateConversationData_Status struct { + Status ConversationStatus `protobuf:"varint,12,opt,name=status,proto3,enum=conversations.ConversationStatus,oneof"` +} + +type UpdateConversationData_Mute struct { + Mute ConversationMuteStatus `protobuf:"varint,7,opt,name=mute,proto3,enum=conversations.ConversationMuteStatus,oneof"` +} + +func (*UpdateConversationData_Status) isUpdateConversationData_Data() {} + +func (*UpdateConversationData_Mute) isUpdateConversationData_Data() {} + +type DeleteMessagePayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageID string `protobuf:"bytes,2,opt,name=messageID,proto3" json:"messageID,omitempty"` +} + +func (x *DeleteMessagePayload) Reset() { + *x = DeleteMessagePayload{} + if protoimpl.UnsafeEnabled { + mi := &file_conversations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteMessagePayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMessagePayload) ProtoMessage() {} + +func (x *DeleteMessagePayload) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMessagePayload.ProtoReflect.Descriptor instead. +func (*DeleteMessagePayload) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteMessagePayload) GetMessageID() string { + if x != nil { + return x.MessageID + } + return "" +} + type SendMessagePayload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -153,12 +983,14 @@ type SendMessagePayload struct { ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID,omitempty"` MessagePayload *MessagePayload `protobuf:"bytes,3,opt,name=messagePayload,proto3" json:"messagePayload,omitempty"` TmpID string `protobuf:"bytes,5,opt,name=tmpID,proto3" json:"tmpID,omitempty"` + IsReply bool `protobuf:"varint,6,opt,name=isReply,proto3" json:"isReply,omitempty"` // not sure + Reply *ReplyPayload `protobuf:"bytes,8,opt,name=reply,proto3" json:"reply,omitempty"` } func (x *SendMessagePayload) Reset() { *x = SendMessagePayload{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[0] + mi := &file_conversations_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -171,7 +1003,7 @@ func (x *SendMessagePayload) String() string { func (*SendMessagePayload) ProtoMessage() {} func (x *SendMessagePayload) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[0] + mi := &file_conversations_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -184,7 +1016,7 @@ func (x *SendMessagePayload) ProtoReflect() protoreflect.Message { // Deprecated: Use SendMessagePayload.ProtoReflect.Descriptor instead. func (*SendMessagePayload) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{0} + return file_conversations_proto_rawDescGZIP(), []int{6} } func (x *SendMessagePayload) GetConversationID() string { @@ -208,6 +1040,67 @@ func (x *SendMessagePayload) GetTmpID() string { return "" } +func (x *SendMessagePayload) GetIsReply() bool { + if x != nil { + return x.IsReply + } + return false +} + +func (x *SendMessagePayload) GetReply() *ReplyPayload { + if x != nil { + return x.Reply + } + return nil +} + +type ReplyPayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageID string `protobuf:"bytes,1,opt,name=messageID,proto3" json:"messageID,omitempty"` +} + +func (x *ReplyPayload) Reset() { + *x = ReplyPayload{} + if protoimpl.UnsafeEnabled { + mi := &file_conversations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplyPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplyPayload) ProtoMessage() {} + +func (x *ReplyPayload) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReplyPayload.ProtoReflect.Descriptor instead. +func (*ReplyPayload) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{7} +} + +func (x *ReplyPayload) GetMessageID() string { + if x != nil { + return x.MessageID + } + return "" +} + type MessagePayload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -216,7 +1109,7 @@ type MessagePayload struct { TmpID string `protobuf:"bytes,1,opt,name=tmpID,proto3" json:"tmpID,omitempty"` MessagePayloadContent *MessagePayloadContent `protobuf:"bytes,6,opt,name=messagePayloadContent,proto3" json:"messagePayloadContent,omitempty"` ConversationID string `protobuf:"bytes,7,opt,name=conversationID,proto3" json:"conversationID,omitempty"` - SelfParticipantID string `protobuf:"bytes,9,opt,name=selfParticipantID,proto3" json:"selfParticipantID,omitempty"` // might be participantId + SelfParticipantID string `protobuf:"bytes,9,opt,name=selfParticipantID,proto3" json:"selfParticipantID,omitempty"` // might be participantID MessageInfo []*MessageInfo `protobuf:"bytes,10,rep,name=messageInfo,proto3" json:"messageInfo,omitempty"` TmpID2 string `protobuf:"bytes,12,opt,name=tmpID2,proto3" json:"tmpID2,omitempty"` } @@ -224,7 +1117,7 @@ type MessagePayload struct { func (x *MessagePayload) Reset() { *x = MessagePayload{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[1] + mi := &file_conversations_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -237,7 +1130,7 @@ func (x *MessagePayload) String() string { func (*MessagePayload) ProtoMessage() {} func (x *MessagePayload) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[1] + mi := &file_conversations_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -250,7 +1143,7 @@ func (x *MessagePayload) ProtoReflect() protoreflect.Message { // Deprecated: Use MessagePayload.ProtoReflect.Descriptor instead. func (*MessagePayload) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{1} + return file_conversations_proto_rawDescGZIP(), []int{8} } func (x *MessagePayload) GetTmpID() string { @@ -306,7 +1199,7 @@ type MessagePayloadContent struct { func (x *MessagePayloadContent) Reset() { *x = MessagePayloadContent{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[2] + mi := &file_conversations_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -319,7 +1212,7 @@ func (x *MessagePayloadContent) String() string { func (*MessagePayloadContent) ProtoMessage() {} func (x *MessagePayloadContent) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[2] + mi := &file_conversations_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -332,7 +1225,7 @@ func (x *MessagePayloadContent) ProtoReflect() protoreflect.Message { // Deprecated: Use MessagePayloadContent.ProtoReflect.Descriptor instead. func (*MessagePayloadContent) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{2} + return file_conversations_proto_rawDescGZIP(), []int{9} } func (x *MessagePayloadContent) GetMessageContent() *MessageContent { @@ -353,7 +1246,7 @@ type OpenConversationPayload struct { func (x *OpenConversationPayload) Reset() { *x = OpenConversationPayload{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[3] + mi := &file_conversations_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -366,7 +1259,7 @@ func (x *OpenConversationPayload) String() string { func (*OpenConversationPayload) ProtoMessage() {} func (x *OpenConversationPayload) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[3] + mi := &file_conversations_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -379,7 +1272,7 @@ func (x *OpenConversationPayload) ProtoReflect() protoreflect.Message { // Deprecated: Use OpenConversationPayload.ProtoReflect.Descriptor instead. func (*OpenConversationPayload) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{3} + return file_conversations_proto_rawDescGZIP(), []int{10} } func (x *OpenConversationPayload) GetConversationID() string { @@ -400,7 +1293,7 @@ type PrepareOpenConversationPayload struct { func (x *PrepareOpenConversationPayload) Reset() { *x = PrepareOpenConversationPayload{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[4] + mi := &file_conversations_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -413,7 +1306,7 @@ func (x *PrepareOpenConversationPayload) String() string { func (*PrepareOpenConversationPayload) ProtoMessage() {} func (x *PrepareOpenConversationPayload) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[4] + mi := &file_conversations_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -426,7 +1319,7 @@ func (x *PrepareOpenConversationPayload) ProtoReflect() protoreflect.Message { // Deprecated: Use PrepareOpenConversationPayload.ProtoReflect.Descriptor instead. func (*PrepareOpenConversationPayload) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{4} + return file_conversations_proto_rawDescGZIP(), []int{11} } func (x *PrepareOpenConversationPayload) GetField2() int64 { @@ -449,7 +1342,7 @@ type FetchConversationMessagesPayload struct { func (x *FetchConversationMessagesPayload) Reset() { *x = FetchConversationMessagesPayload{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[5] + mi := &file_conversations_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -462,7 +1355,7 @@ func (x *FetchConversationMessagesPayload) String() string { func (*FetchConversationMessagesPayload) ProtoMessage() {} func (x *FetchConversationMessagesPayload) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[5] + mi := &file_conversations_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -475,7 +1368,7 @@ func (x *FetchConversationMessagesPayload) ProtoReflect() protoreflect.Message { // Deprecated: Use FetchConversationMessagesPayload.ProtoReflect.Descriptor instead. func (*FetchConversationMessagesPayload) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{5} + return file_conversations_proto_rawDescGZIP(), []int{12} } func (x *FetchConversationMessagesPayload) GetConversationID() string { @@ -511,7 +1404,7 @@ type ListCoversationsPayload struct { func (x *ListCoversationsPayload) Reset() { *x = ListCoversationsPayload{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[6] + mi := &file_conversations_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -524,7 +1417,7 @@ func (x *ListCoversationsPayload) String() string { func (*ListCoversationsPayload) ProtoMessage() {} func (x *ListCoversationsPayload) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[6] + mi := &file_conversations_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -537,7 +1430,7 @@ func (x *ListCoversationsPayload) ProtoReflect() protoreflect.Message { // Deprecated: Use ListCoversationsPayload.ProtoReflect.Descriptor instead. func (*ListCoversationsPayload) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{6} + return file_conversations_proto_rawDescGZIP(), []int{13} } func (x *ListCoversationsPayload) GetCount() int64 { @@ -554,77 +1447,6 @@ func (x *ListCoversationsPayload) GetField4() int64 { return 0 } -type FetchMessagesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` - SomeBytes []byte `protobuf:"bytes,3,opt,name=someBytes,proto3" json:"someBytes,omitempty"` - TotalMessages int64 `protobuf:"varint,4,opt,name=totalMessages,proto3" json:"totalMessages,omitempty"` - Cursor *Cursor `protobuf:"bytes,5,opt,name=cursor,proto3" json:"cursor,omitempty"` -} - -func (x *FetchMessagesResponse) Reset() { - *x = FetchMessagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FetchMessagesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchMessagesResponse) ProtoMessage() {} - -func (x *FetchMessagesResponse) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchMessagesResponse.ProtoReflect.Descriptor instead. -func (*FetchMessagesResponse) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{7} -} - -func (x *FetchMessagesResponse) GetMessages() []*Message { - if x != nil { - return x.Messages - } - return nil -} - -func (x *FetchMessagesResponse) GetSomeBytes() []byte { - if x != nil { - return x.SomeBytes - } - return nil -} - -func (x *FetchMessagesResponse) GetTotalMessages() int64 { - if x != nil { - return x.TotalMessages - } - return 0 -} - -func (x *FetchMessagesResponse) GetCursor() *Cursor { - if x != nil { - return x.Cursor - } - return nil -} - type Cursor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -637,7 +1459,7 @@ type Cursor struct { func (x *Cursor) Reset() { *x = Cursor{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[8] + mi := &file_conversations_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -650,7 +1472,7 @@ func (x *Cursor) String() string { func (*Cursor) ProtoMessage() {} func (x *Cursor) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[8] + mi := &file_conversations_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -663,7 +1485,7 @@ func (x *Cursor) ProtoReflect() protoreflect.Message { // Deprecated: Use Cursor.ProtoReflect.Descriptor instead. func (*Cursor) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{8} + return file_conversations_proto_rawDescGZIP(), []int{14} } func (x *Cursor) GetSomeStr() string { @@ -685,21 +1507,23 @@ type Message struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MessageID string `protobuf:"bytes,1,opt,name=messageID,proto3" json:"messageID,omitempty"` - From *IsFromMe `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"` - MessageStatus *MessageStatus `protobuf:"bytes,4,opt,name=messageStatus,proto3" json:"messageStatus,omitempty"` - Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - ConversationID string `protobuf:"bytes,7,opt,name=conversationID,proto3" json:"conversationID,omitempty"` - ParticipantID string `protobuf:"bytes,9,opt,name=participantID,proto3" json:"participantID,omitempty"` - MessageInfo []*MessageInfo `protobuf:"bytes,10,rep,name=messageInfo,proto3" json:"messageInfo,omitempty"` - Type MessageType `protobuf:"varint,11,opt,name=type,proto3,enum=conversations.MessageType" json:"type,omitempty"` - TmpId string `protobuf:"bytes,12,opt,name=tmpId,proto3" json:"tmpId,omitempty"` + MessageID string `protobuf:"bytes,1,opt,name=messageID,proto3" json:"messageID,omitempty"` + MsgType *MsgType `protobuf:"bytes,3,opt,name=msgType,proto3" json:"msgType,omitempty"` + MessageStatus *MessageStatus `protobuf:"bytes,4,opt,name=messageStatus,proto3" json:"messageStatus,omitempty"` + Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // check this + ConversationID string `protobuf:"bytes,7,opt,name=conversationID,proto3" json:"conversationID,omitempty"` + ParticipantID string `protobuf:"bytes,9,opt,name=participantID,proto3" json:"participantID,omitempty"` + MessageInfo []*MessageInfo `protobuf:"bytes,10,rep,name=messageInfo,proto3" json:"messageInfo,omitempty"` + Type int64 `protobuf:"varint,11,opt,name=type,proto3" json:"type,omitempty"` + TmpID string `protobuf:"bytes,12,opt,name=tmpID,proto3" json:"tmpID,omitempty"` + SomeInt int64 `protobuf:"varint,16,opt,name=someInt,proto3" json:"someInt,omitempty"` + Reactions []*ReactionResponse `protobuf:"bytes,19,rep,name=reactions,proto3" json:"reactions,omitempty"` } func (x *Message) Reset() { *x = Message{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[9] + mi := &file_conversations_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -712,7 +1536,7 @@ func (x *Message) String() string { func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[9] + mi := &file_conversations_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -725,7 +1549,7 @@ func (x *Message) ProtoReflect() protoreflect.Message { // Deprecated: Use Message.ProtoReflect.Descriptor instead. func (*Message) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{9} + return file_conversations_proto_rawDescGZIP(), []int{15} } func (x *Message) GetMessageID() string { @@ -735,9 +1559,9 @@ func (x *Message) GetMessageID() string { return "" } -func (x *Message) GetFrom() *IsFromMe { +func (x *Message) GetMsgType() *MsgType { if x != nil { - return x.From + return x.MsgType } return nil } @@ -777,37 +1601,152 @@ func (x *Message) GetMessageInfo() []*MessageInfo { return nil } -func (x *Message) GetType() MessageType { +func (x *Message) GetType() int64 { if x != nil { return x.Type } - return MessageType_UNKNOWN + return 0 } -func (x *Message) GetTmpId() string { +func (x *Message) GetTmpID() string { if x != nil { - return x.TmpId + return x.TmpID } return "" } +func (x *Message) GetSomeInt() int64 { + if x != nil { + return x.SomeInt + } + return 0 +} + +func (x *Message) GetReactions() []*ReactionResponse { + if x != nil { + return x.Reactions + } + return nil +} + +type ReplyMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageID string `protobuf:"bytes,1,opt,name=messageID,proto3" json:"messageID,omitempty"` + ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID,omitempty"` // might be participantID + ReplyMessageData *ReplyMessageData `protobuf:"bytes,3,opt,name=replyMessageData,proto3" json:"replyMessageData,omitempty"` +} + +func (x *ReplyMessage) Reset() { + *x = ReplyMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_conversations_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplyMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplyMessage) ProtoMessage() {} + +func (x *ReplyMessage) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReplyMessage.ProtoReflect.Descriptor instead. +func (*ReplyMessage) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{16} +} + +func (x *ReplyMessage) GetMessageID() string { + if x != nil { + return x.MessageID + } + return "" +} + +func (x *ReplyMessage) GetConversationID() string { + if x != nil { + return x.ConversationID + } + return "" +} + +func (x *ReplyMessage) GetReplyMessageData() *ReplyMessageData { + if x != nil { + return x.ReplyMessageData + } + return nil +} + +type ReplyMessageData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReplyMessageData) Reset() { + *x = ReplyMessageData{} + if protoimpl.UnsafeEnabled { + mi := &file_conversations_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplyMessageData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplyMessageData) ProtoMessage() {} + +func (x *ReplyMessageData) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReplyMessageData.ProtoReflect.Descriptor instead. +func (*ReplyMessageData) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{17} +} + type MessageInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - OrderInternal string `protobuf:"bytes,1,opt,name=orderInternal,proto3" json:"orderInternal,omitempty"` + ActionMessageID string `protobuf:"bytes,1,opt,name=actionMessageID,proto3" json:"actionMessageID,omitempty"` // Types that are assignable to Data: // // *MessageInfo_MessageContent - // *MessageInfo_ImageContent + // *MessageInfo_MediaContent Data isMessageInfo_Data `protobuf_oneof:"data"` } func (x *MessageInfo) Reset() { *x = MessageInfo{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[10] + mi := &file_conversations_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -820,7 +1759,7 @@ func (x *MessageInfo) String() string { func (*MessageInfo) ProtoMessage() {} func (x *MessageInfo) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[10] + mi := &file_conversations_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -833,12 +1772,12 @@ func (x *MessageInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageInfo.ProtoReflect.Descriptor instead. func (*MessageInfo) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{10} + return file_conversations_proto_rawDescGZIP(), []int{18} } -func (x *MessageInfo) GetOrderInternal() string { +func (x *MessageInfo) GetActionMessageID() string { if x != nil { - return x.OrderInternal + return x.ActionMessageID } return "" } @@ -857,9 +1796,9 @@ func (x *MessageInfo) GetMessageContent() *MessageContent { return nil } -func (x *MessageInfo) GetImageContent() *ImageContent { - if x, ok := x.GetData().(*MessageInfo_ImageContent); ok { - return x.ImageContent +func (x *MessageInfo) GetMediaContent() *MediaContent { + if x, ok := x.GetData().(*MessageInfo_MediaContent); ok { + return x.MediaContent } return nil } @@ -872,47 +1811,47 @@ type MessageInfo_MessageContent struct { MessageContent *MessageContent `protobuf:"bytes,2,opt,name=messageContent,proto3,oneof"` } -type MessageInfo_ImageContent struct { - ImageContent *ImageContent `protobuf:"bytes,3,opt,name=imageContent,proto3,oneof"` +type MessageInfo_MediaContent struct { + MediaContent *MediaContent `protobuf:"bytes,3,opt,name=mediaContent,proto3,oneof"` } func (*MessageInfo_MessageContent) isMessageInfo_Data() {} -func (*MessageInfo_ImageContent) isMessageInfo_Data() {} +func (*MessageInfo_MediaContent) isMessageInfo_Data() {} -type ImageContent struct { +type MediaContent struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SomeNumber int64 `protobuf:"varint,1,opt,name=someNumber,proto3" json:"someNumber,omitempty"` - ImageID string `protobuf:"bytes,2,opt,name=imageID,proto3" json:"imageID,omitempty"` - ImageName string `protobuf:"bytes,4,opt,name=imageName,proto3" json:"imageName,omitempty"` + Format MediaFormats `protobuf:"varint,1,opt,name=format,proto3,enum=conversations.MediaFormats" json:"format,omitempty"` + MediaID string `protobuf:"bytes,2,opt,name=mediaID,proto3" json:"mediaID,omitempty"` + MediaName string `protobuf:"bytes,4,opt,name=mediaName,proto3" json:"mediaName,omitempty"` Size int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"` - Pixels *ImagePixels `protobuf:"bytes,6,opt,name=pixels,proto3" json:"pixels,omitempty"` - ImageData []byte `protobuf:"bytes,7,opt,name=imageData,proto3" json:"imageData,omitempty"` - ImageID2 string `protobuf:"bytes,9,opt,name=imageID2,proto3" json:"imageID2,omitempty"` + Pixels *Pixels `protobuf:"bytes,6,opt,name=pixels,proto3" json:"pixels,omitempty"` + MediaData []byte `protobuf:"bytes,7,opt,name=mediaData,proto3" json:"mediaData,omitempty"` + MediaID2 string `protobuf:"bytes,9,opt,name=mediaID2,proto3" json:"mediaID2,omitempty"` DecryptionKey []byte `protobuf:"bytes,11,opt,name=decryptionKey,proto3" json:"decryptionKey,omitempty"` DecryptionKey2 []byte `protobuf:"bytes,12,opt,name=decryptionKey2,proto3" json:"decryptionKey2,omitempty"` // same value as decryptionkey? } -func (x *ImageContent) Reset() { - *x = ImageContent{} +func (x *MediaContent) Reset() { + *x = MediaContent{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[11] + mi := &file_conversations_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ImageContent) String() string { +func (x *MediaContent) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ImageContent) ProtoMessage() {} +func (*MediaContent) ProtoMessage() {} -func (x *ImageContent) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[11] +func (x *MediaContent) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -923,75 +1862,75 @@ func (x *ImageContent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ImageContent.ProtoReflect.Descriptor instead. -func (*ImageContent) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{11} +// Deprecated: Use MediaContent.ProtoReflect.Descriptor instead. +func (*MediaContent) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{19} } -func (x *ImageContent) GetSomeNumber() int64 { +func (x *MediaContent) GetFormat() MediaFormats { if x != nil { - return x.SomeNumber + return x.Format } - return 0 + return MediaFormats_UNSPECIFIED_TYPE } -func (x *ImageContent) GetImageID() string { +func (x *MediaContent) GetMediaID() string { if x != nil { - return x.ImageID + return x.MediaID } return "" } -func (x *ImageContent) GetImageName() string { +func (x *MediaContent) GetMediaName() string { if x != nil { - return x.ImageName + return x.MediaName } return "" } -func (x *ImageContent) GetSize() int64 { +func (x *MediaContent) GetSize() int64 { if x != nil { return x.Size } return 0 } -func (x *ImageContent) GetPixels() *ImagePixels { +func (x *MediaContent) GetPixels() *Pixels { if x != nil { return x.Pixels } return nil } -func (x *ImageContent) GetImageData() []byte { +func (x *MediaContent) GetMediaData() []byte { if x != nil { - return x.ImageData + return x.MediaData } return nil } -func (x *ImageContent) GetImageID2() string { +func (x *MediaContent) GetMediaID2() string { if x != nil { - return x.ImageID2 + return x.MediaID2 } return "" } -func (x *ImageContent) GetDecryptionKey() []byte { +func (x *MediaContent) GetDecryptionKey() []byte { if x != nil { return x.DecryptionKey } return nil } -func (x *ImageContent) GetDecryptionKey2() []byte { +func (x *MediaContent) GetDecryptionKey2() []byte { if x != nil { return x.DecryptionKey2 } return nil } -type ImagePixels struct { +type Pixels struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1000,23 +1939,23 @@ type ImagePixels struct { Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` } -func (x *ImagePixels) Reset() { - *x = ImagePixels{} +func (x *Pixels) Reset() { + *x = Pixels{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[12] + mi := &file_conversations_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ImagePixels) String() string { +func (x *Pixels) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ImagePixels) ProtoMessage() {} +func (*Pixels) ProtoMessage() {} -func (x *ImagePixels) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[12] +func (x *Pixels) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1027,19 +1966,19 @@ func (x *ImagePixels) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ImagePixels.ProtoReflect.Descriptor instead. -func (*ImagePixels) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{12} +// Deprecated: Use Pixels.ProtoReflect.Descriptor instead. +func (*Pixels) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{20} } -func (x *ImagePixels) GetWidth() int64 { +func (x *Pixels) GetWidth() int64 { if x != nil { return x.Width } return 0 } -func (x *ImagePixels) GetHeight() int64 { +func (x *Pixels) GetHeight() int64 { if x != nil { return x.Height } @@ -1057,7 +1996,7 @@ type MessageContent struct { func (x *MessageContent) Reset() { *x = MessageContent{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[13] + mi := &file_conversations_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1070,7 +2009,7 @@ func (x *MessageContent) String() string { func (*MessageContent) ProtoMessage() {} func (x *MessageContent) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[13] + mi := &file_conversations_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1083,7 +2022,7 @@ func (x *MessageContent) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageContent.ProtoReflect.Descriptor instead. func (*MessageContent) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{13} + return file_conversations_proto_rawDescGZIP(), []int{21} } func (x *MessageContent) GetContent() string { @@ -1093,31 +2032,31 @@ func (x *MessageContent) GetContent() string { return "" } -type IsFromMe struct { +type MsgType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FromMe bool `protobuf:"varint,1,opt,name=fromMe,proto3" json:"fromMe,omitempty"` + Type int64 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` } -func (x *IsFromMe) Reset() { - *x = IsFromMe{} +func (x *MsgType) Reset() { + *x = MsgType{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[14] + mi := &file_conversations_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsFromMe) String() string { +func (x *MsgType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsFromMe) ProtoMessage() {} +func (*MsgType) ProtoMessage() {} -func (x *IsFromMe) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[14] +func (x *MsgType) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1128,16 +2067,16 @@ func (x *IsFromMe) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsFromMe.ProtoReflect.Descriptor instead. -func (*IsFromMe) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{14} +// Deprecated: Use MsgType.ProtoReflect.Descriptor instead. +func (*MsgType) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{22} } -func (x *IsFromMe) GetFromMe() bool { +func (x *MsgType) GetType() int64 { if x != nil { - return x.FromMe + return x.Type } - return false + return 0 } type MessageStatus struct { @@ -1145,22 +2084,17 @@ type MessageStatus struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // // MMS / SMS - // UNKNOWN_STATUS = 0; - // SENDING = 5; - // SENT = 1; - // - // // RCS - // READ|SEEN = 11; - Code MsgStatusCode `protobuf:"varint,2,opt,name=code,proto3,enum=conversations.MsgStatusCode" json:"code,omitempty"` - ErrMsg string `protobuf:"bytes,4,opt,name=errMsg,proto3" json:"errMsg,omitempty"` - MsgStatus string `protobuf:"bytes,5,opt,name=msgStatus,proto3" json:"msgStatus,omitempty"` + Status MessageStatusType `protobuf:"varint,2,opt,name=status,proto3,enum=conversations.MessageStatusType" json:"status,omitempty"` + SubCode int64 `protobuf:"varint,3,opt,name=subCode,proto3" json:"subCode,omitempty"` + ErrMsg string `protobuf:"bytes,4,opt,name=errMsg,proto3" json:"errMsg,omitempty"` + StatusText string `protobuf:"bytes,5,opt,name=statusText,proto3" json:"statusText,omitempty"` + ThirdCode int64 `protobuf:"varint,6,opt,name=thirdCode,proto3" json:"thirdCode,omitempty"` } func (x *MessageStatus) Reset() { *x = MessageStatus{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[15] + mi := &file_conversations_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1173,7 +2107,7 @@ func (x *MessageStatus) String() string { func (*MessageStatus) ProtoMessage() {} func (x *MessageStatus) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[15] + mi := &file_conversations_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1186,14 +2120,21 @@ func (x *MessageStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageStatus.ProtoReflect.Descriptor instead. func (*MessageStatus) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{15} + return file_conversations_proto_rawDescGZIP(), []int{23} } -func (x *MessageStatus) GetCode() MsgStatusCode { +func (x *MessageStatus) GetStatus() MessageStatusType { if x != nil { - return x.Code + return x.Status } - return MsgStatusCode_UNKNOWN_STATUS + return MessageStatusType_STATUS_UNKNOWN +} + +func (x *MessageStatus) GetSubCode() int64 { + if x != nil { + return x.SubCode + } + return 0 } func (x *MessageStatus) GetErrMsg() string { @@ -1203,13 +2144,20 @@ func (x *MessageStatus) GetErrMsg() string { return "" } -func (x *MessageStatus) GetMsgStatus() string { +func (x *MessageStatus) GetStatusText() string { if x != nil { - return x.MsgStatus + return x.StatusText } return "" } +func (x *MessageStatus) GetThirdCode() int64 { + if x != nil { + return x.ThirdCode + } + return 0 +} + type Conversations struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1221,7 +2169,7 @@ type Conversations struct { func (x *Conversations) Reset() { *x = Conversations{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[16] + mi := &file_conversations_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1234,7 +2182,7 @@ func (x *Conversations) String() string { func (*Conversations) ProtoMessage() {} func (x *Conversations) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[16] + mi := &file_conversations_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1247,7 +2195,7 @@ func (x *Conversations) ProtoReflect() protoreflect.Message { // Deprecated: Use Conversations.ProtoReflect.Descriptor instead. func (*Conversations) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{16} + return file_conversations_proto_rawDescGZIP(), []int{24} } func (x *Conversations) GetConversations() []*Conversation { @@ -1265,22 +2213,24 @@ type Conversation struct { ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` LatestMessage *LatestMessage `protobuf:"bytes,4,opt,name=latestMessage,proto3" json:"latestMessage,omitempty"` - TimestampMS int64 `protobuf:"varint,5,opt,name=timestampMS,proto3" json:"timestampMS,omitempty"` + TimestampMs int64 `protobuf:"varint,5,opt,name=timestampMs,proto3" json:"timestampMs,omitempty"` IsGroupChat bool `protobuf:"varint,10,opt,name=isGroupChat,proto3" json:"isGroupChat,omitempty"` // not certain SelfParticipantID string `protobuf:"bytes,11,opt,name=selfParticipantID,proto3" json:"selfParticipantID,omitempty"` // bool bool1 = 13; - Status int64 `protobuf:"varint,12,opt,name=status,proto3" json:"status,omitempty"` - HashHex string `protobuf:"bytes,15,opt,name=hashHex,proto3" json:"hashHex,omitempty"` - MessageID string `protobuf:"bytes,17,opt,name=messageID,proto3" json:"messageID,omitempty"` - Participants []*Participant `protobuf:"bytes,20,rep,name=participants,proto3" json:"participants,omitempty"` - OtherParticipants []string `protobuf:"bytes,21,rep,name=otherParticipants,proto3" json:"otherParticipants,omitempty"` // participant ids excluding me - Type int64 `protobuf:"varint,22,opt,name=type,proto3" json:"type,omitempty"` + Status ConvUpdateTypes `protobuf:"varint,12,opt,name=status,proto3,enum=conversations.ConvUpdateTypes" json:"status,omitempty"` + AvatarHexColor string `protobuf:"bytes,15,opt,name=avatarHexColor,proto3" json:"avatarHexColor,omitempty"` + LatestMessageID string `protobuf:"bytes,17,opt,name=latestMessageID,proto3" json:"latestMessageID,omitempty"` + Participants []*Participant `protobuf:"bytes,20,rep,name=participants,proto3" json:"participants,omitempty"` + OtherParticipants []string `protobuf:"bytes,21,rep,name=otherParticipants,proto3" json:"otherParticipants,omitempty"` // participant ids excluding me + Type int64 `protobuf:"varint,22,opt,name=type,proto3" json:"type,omitempty"` + SubType bool `protobuf:"varint,24,opt,name=subType,proto3" json:"subType,omitempty"` + ThirdType bool `protobuf:"varint,29,opt,name=thirdType,proto3" json:"thirdType,omitempty"` } func (x *Conversation) Reset() { *x = Conversation{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[17] + mi := &file_conversations_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1293,7 +2243,7 @@ func (x *Conversation) String() string { func (*Conversation) ProtoMessage() {} func (x *Conversation) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[17] + mi := &file_conversations_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1306,7 +2256,7 @@ func (x *Conversation) ProtoReflect() protoreflect.Message { // Deprecated: Use Conversation.ProtoReflect.Descriptor instead. func (*Conversation) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{17} + return file_conversations_proto_rawDescGZIP(), []int{25} } func (x *Conversation) GetConversationID() string { @@ -1330,9 +2280,9 @@ func (x *Conversation) GetLatestMessage() *LatestMessage { return nil } -func (x *Conversation) GetTimestampMS() int64 { +func (x *Conversation) GetTimestampMs() int64 { if x != nil { - return x.TimestampMS + return x.TimestampMs } return 0 } @@ -1351,23 +2301,23 @@ func (x *Conversation) GetSelfParticipantID() string { return "" } -func (x *Conversation) GetStatus() int64 { +func (x *Conversation) GetStatus() ConvUpdateTypes { if x != nil { return x.Status } - return 0 + return ConvUpdateTypes_UNKNOWN_CONVTYPE } -func (x *Conversation) GetHashHex() string { +func (x *Conversation) GetAvatarHexColor() string { if x != nil { - return x.HashHex + return x.AvatarHexColor } return "" } -func (x *Conversation) GetMessageID() string { +func (x *Conversation) GetLatestMessageID() string { if x != nil { - return x.MessageID + return x.LatestMessageID } return "" } @@ -1393,28 +2343,43 @@ func (x *Conversation) GetType() int64 { return 0 } +func (x *Conversation) GetSubType() bool { + if x != nil { + return x.SubType + } + return false +} + +func (x *Conversation) GetThirdType() bool { + if x != nil { + return x.ThirdType + } + return false +} + type Participant struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id *UserIdentifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - FirstName string `protobuf:"bytes,2,opt,name=firstName,proto3" json:"firstName,omitempty"` - FullName string `protobuf:"bytes,3,opt,name=fullName,proto3" json:"fullName,omitempty"` - Color string `protobuf:"bytes,5,opt,name=color,proto3" json:"color,omitempty"` - IsMe bool `protobuf:"varint,6,opt,name=isMe,proto3" json:"isMe,omitempty"` - Muted *Muted `protobuf:"bytes,7,opt,name=muted,proto3" json:"muted,omitempty"` - // bool bool2 = 8; - AvatarID string `protobuf:"bytes,10,opt,name=avatarID,proto3" json:"avatarID,omitempty"` - // bool bool3 = 11; - Bs int64 `protobuf:"varint,14,opt,name=bs,proto3" json:"bs,omitempty"` - FormattedNumber string `protobuf:"bytes,15,opt,name=formattedNumber,proto3" json:"formattedNumber,omitempty"` + ID *SmallInfo `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` + FirstName string `protobuf:"bytes,2,opt,name=firstName,proto3" json:"firstName,omitempty"` + FullName string `protobuf:"bytes,3,opt,name=fullName,proto3" json:"fullName,omitempty"` + AvatarHexColor string `protobuf:"bytes,5,opt,name=avatarHexColor,proto3" json:"avatarHexColor,omitempty"` + IsMe bool `protobuf:"varint,6,opt,name=isMe,proto3" json:"isMe,omitempty"` + Muted *Muted `protobuf:"bytes,7,opt,name=muted,proto3" json:"muted,omitempty"` + SomeInt int64 `protobuf:"varint,8,opt,name=someInt,proto3" json:"someInt,omitempty"` + AvatarID string `protobuf:"bytes,10,opt,name=avatarID,proto3" json:"avatarID,omitempty"` + Bs int64 `protobuf:"varint,14,opt,name=bs,proto3" json:"bs,omitempty"` + FormattedNumber string `protobuf:"bytes,15,opt,name=formattedNumber,proto3" json:"formattedNumber,omitempty"` + SomeInt1 int64 `protobuf:"varint,19,opt,name=someInt1,proto3" json:"someInt1,omitempty"` + SomeInt2 int64 `protobuf:"varint,20,opt,name=someInt2,proto3" json:"someInt2,omitempty"` } func (x *Participant) Reset() { *x = Participant{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[18] + mi := &file_conversations_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1427,7 +2392,7 @@ func (x *Participant) String() string { func (*Participant) ProtoMessage() {} func (x *Participant) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[18] + mi := &file_conversations_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1440,12 +2405,12 @@ func (x *Participant) ProtoReflect() protoreflect.Message { // Deprecated: Use Participant.ProtoReflect.Descriptor instead. func (*Participant) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{18} + return file_conversations_proto_rawDescGZIP(), []int{26} } -func (x *Participant) GetId() *UserIdentifier { +func (x *Participant) GetID() *SmallInfo { if x != nil { - return x.Id + return x.ID } return nil } @@ -1464,9 +2429,9 @@ func (x *Participant) GetFullName() string { return "" } -func (x *Participant) GetColor() string { +func (x *Participant) GetAvatarHexColor() string { if x != nil { - return x.Color + return x.AvatarHexColor } return "" } @@ -1485,6 +2450,13 @@ func (x *Participant) GetMuted() *Muted { return nil } +func (x *Participant) GetSomeInt() int64 { + if x != nil { + return x.SomeInt + } + return 0 +} + func (x *Participant) GetAvatarID() string { if x != nil { return x.AvatarID @@ -1506,7 +2478,21 @@ func (x *Participant) GetFormattedNumber() string { return "" } -type UserIdentifier struct { +func (x *Participant) GetSomeInt1() int64 { + if x != nil { + return x.SomeInt1 + } + return 0 +} + +func (x *Participant) GetSomeInt2() int64 { + if x != nil { + return x.SomeInt2 + } + return 0 +} + +type SmallInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1516,23 +2502,23 @@ type UserIdentifier struct { ParticipantID string `protobuf:"bytes,3,opt,name=participantID,proto3" json:"participantID,omitempty"` } -func (x *UserIdentifier) Reset() { - *x = UserIdentifier{} +func (x *SmallInfo) Reset() { + *x = SmallInfo{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[19] + mi := &file_conversations_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *UserIdentifier) String() string { +func (x *SmallInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserIdentifier) ProtoMessage() {} +func (*SmallInfo) ProtoMessage() {} -func (x *UserIdentifier) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[19] +func (x *SmallInfo) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1543,26 +2529,26 @@ func (x *UserIdentifier) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserIdentifier.ProtoReflect.Descriptor instead. -func (*UserIdentifier) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{19} +// Deprecated: Use SmallInfo.ProtoReflect.Descriptor instead. +func (*SmallInfo) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{27} } -func (x *UserIdentifier) GetType() int64 { +func (x *SmallInfo) GetType() int64 { if x != nil { return x.Type } return 0 } -func (x *UserIdentifier) GetNumber() string { +func (x *SmallInfo) GetNumber() string { if x != nil { return x.Number } return "" } -func (x *UserIdentifier) GetParticipantID() string { +func (x *SmallInfo) GetParticipantID() string { if x != nil { return x.ParticipantID } @@ -1574,15 +2560,16 @@ type LatestMessage struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` - FromMe bool `protobuf:"varint,2,opt,name=fromMe,proto3" json:"fromMe,omitempty"` // isMe? - DisplayName string `protobuf:"bytes,4,opt,name=displayName,proto3" json:"displayName,omitempty"` //Unknown unknown = 5; + DisplayContent string `protobuf:"bytes,1,opt,name=displayContent,proto3" json:"displayContent,omitempty"` + FromMe int64 `protobuf:"varint,2,opt,name=fromMe,proto3" json:"fromMe,omitempty"` // isMe? + DisplayName string `protobuf:"bytes,4,opt,name=displayName,proto3" json:"displayName,omitempty"` + LatestMessageStatus *LatestMessageStatus `protobuf:"bytes,5,opt,name=latestMessageStatus,proto3" json:"latestMessageStatus,omitempty"` } func (x *LatestMessage) Reset() { *x = LatestMessage{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[20] + mi := &file_conversations_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1595,7 +2582,7 @@ func (x *LatestMessage) String() string { func (*LatestMessage) ProtoMessage() {} func (x *LatestMessage) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[20] + mi := &file_conversations_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1608,21 +2595,21 @@ func (x *LatestMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use LatestMessage.ProtoReflect.Descriptor instead. func (*LatestMessage) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{20} + return file_conversations_proto_rawDescGZIP(), []int{28} } -func (x *LatestMessage) GetContent() string { +func (x *LatestMessage) GetDisplayContent() string { if x != nil { - return x.Content + return x.DisplayContent } return "" } -func (x *LatestMessage) GetFromMe() bool { +func (x *LatestMessage) GetFromMe() int64 { if x != nil { return x.FromMe } - return false + return 0 } func (x *LatestMessage) GetDisplayName() string { @@ -1632,32 +2619,39 @@ func (x *LatestMessage) GetDisplayName() string { return "" } -type Unknown struct { +func (x *LatestMessage) GetLatestMessageStatus() *LatestMessageStatus { + if x != nil { + return x.LatestMessageStatus + } + return nil +} + +type LatestMessageStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Field1 int64 `protobuf:"varint,1,opt,name=field1,proto3" json:"field1,omitempty"` - Field2 int64 `protobuf:"varint,2,opt,name=field2,proto3" json:"field2,omitempty"` + Status2 int64 `protobuf:"varint,1,opt,name=status2,proto3" json:"status2,omitempty"` + Status MessageStatusType `protobuf:"varint,2,opt,name=status,proto3,enum=conversations.MessageStatusType" json:"status,omitempty"` } -func (x *Unknown) Reset() { - *x = Unknown{} +func (x *LatestMessageStatus) Reset() { + *x = LatestMessageStatus{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[21] + mi := &file_conversations_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Unknown) String() string { +func (x *LatestMessageStatus) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Unknown) ProtoMessage() {} +func (*LatestMessageStatus) ProtoMessage() {} -func (x *Unknown) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[21] +func (x *LatestMessageStatus) ProtoReflect() protoreflect.Message { + mi := &file_conversations_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1668,23 +2662,23 @@ func (x *Unknown) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Unknown.ProtoReflect.Descriptor instead. -func (*Unknown) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{21} +// Deprecated: Use LatestMessageStatus.ProtoReflect.Descriptor instead. +func (*LatestMessageStatus) Descriptor() ([]byte, []int) { + return file_conversations_proto_rawDescGZIP(), []int{29} } -func (x *Unknown) GetField1() int64 { +func (x *LatestMessageStatus) GetStatus2() int64 { if x != nil { - return x.Field1 + return x.Status2 } return 0 } -func (x *Unknown) GetField2() int64 { +func (x *LatestMessageStatus) GetStatus() MessageStatusType { if x != nil { - return x.Field2 + return x.Status } - return 0 + return MessageStatusType_STATUS_UNKNOWN } type Muted struct { @@ -1698,7 +2692,7 @@ type Muted struct { func (x *Muted) Reset() { *x = Muted{} if protoimpl.UnsafeEnabled { - mi := &file_conversations_proto_msgTypes[22] + mi := &file_conversations_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1711,7 +2705,7 @@ func (x *Muted) String() string { func (*Muted) ProtoMessage() {} func (x *Muted) ProtoReflect() protoreflect.Message { - mi := &file_conversations_proto_msgTypes[22] + mi := &file_conversations_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1724,7 +2718,7 @@ func (x *Muted) ProtoReflect() protoreflect.Message { // Deprecated: Use Muted.ProtoReflect.Descriptor instead. func (*Muted) Descriptor() ([]byte, []int) { - return file_conversations_proto_rawDescGZIP(), []int{22} + return file_conversations_proto_rawDescGZIP(), []int{30} } func (x *Muted) GetIsMuted() bool { @@ -1739,240 +2733,557 @@ var File_conversations_proto protoreflect.FileDescriptor var file_conversations_proto_rawDesc = []byte{ 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x63, + 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x0f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x22, 0x41, 0x0a, 0x17, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xfd, + 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x39, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3f, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x35, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x35, 0x22, 0x2d, + 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x35, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x22, 0xc2, 0x01, + 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, + 0x04, 0x6d, 0x75, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x63, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x75, 0x74, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x22, 0x34, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x22, 0xe6, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x6e, + 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, + 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6d, 0x70, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x6d, 0x70, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x31, + 0x0a, 0x05, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x05, 0x72, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x2c, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x22, + 0xae, 0x02, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6d, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x6d, 0x70, 0x49, 0x44, 0x12, 0x5a, 0x0a, 0x15, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x15, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x2c, 0x0a, 0x11, + 0x73, 0x65, 0x6c, 0x66, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, + 0x44, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, 0x6c, 0x66, 0x50, 0x61, 0x72, + 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x0b, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6d, 0x70, 0x49, + 0x44, 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6d, 0x70, 0x49, 0x44, 0x32, + 0x22, 0x5e, 0x0a, 0x15, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x52, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x22, 0x41, 0x0a, 0x17, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6d, - 0x70, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6d, 0x70, 0x49, 0x44, - 0x22, 0xae, 0x02, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6d, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x6d, 0x70, 0x49, 0x44, 0x12, 0x5a, 0x0a, 0x15, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x15, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x2c, 0x0a, - 0x11, 0x73, 0x65, 0x6c, 0x66, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, - 0x49, 0x44, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, 0x6c, 0x66, 0x50, 0x61, - 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x0b, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6d, 0x70, - 0x49, 0x44, 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6d, 0x70, 0x49, 0x44, - 0x32, 0x22, 0x5e, 0x0a, 0x15, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x52, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x22, 0x41, 0x0a, 0x17, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x26, 0x0a, 0x0e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x38, 0x0a, 0x1e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x4f, - 0x70, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x22, 0x8f, - 0x01, 0x0a, 0x20, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, - 0x22, 0x47, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x34, 0x22, 0xbe, 0x01, 0x0a, 0x15, 0x46, 0x65, - 0x74, 0x63, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x6d, 0x65, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x6f, 0x6d, 0x65, - 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x63, - 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x75, 0x72, 0x73, - 0x6f, 0x72, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x42, 0x0a, 0x06, 0x43, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x6d, 0x65, 0x53, 0x74, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x6d, 0x65, 0x53, 0x74, 0x72, 0x12, 0x1e, - 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x88, - 0x03, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x2b, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x65, 0x52, - 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x42, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, - 0x24, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x44, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, - 0x61, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x6d, 0x70, 0x49, 0x64, 0x22, 0xc7, 0x01, 0x0a, 0x0b, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, - 0x47, 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0c, 0x69, 0x6d, 0x61, 0x67, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0xb6, 0x02, 0x0a, 0x0c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x6d, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x6f, 0x6d, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x1c, - 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x12, 0x32, 0x0a, 0x06, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x52, 0x06, 0x70, 0x69, - 0x78, 0x65, 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x44, 0x32, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x44, 0x32, 0x12, 0x24, - 0x0a, 0x0d, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x64, 0x65, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x32, 0x22, 0x3b, 0x0a, 0x0b, - 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x77, - 0x69, 0x64, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, - 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x2a, 0x0a, 0x0e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x22, 0x0a, 0x08, 0x49, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x4d, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x4d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x4d, 0x65, 0x22, 0x77, 0x0a, 0x0d, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, - 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0x52, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd2, 0x03, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, - 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x53, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x53, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x69, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x73, - 0x65, 0x6c, 0x66, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x44, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, 0x6c, 0x66, 0x50, 0x61, 0x72, 0x74, - 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x68, 0x48, 0x65, 0x78, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x68, 0x61, 0x73, 0x68, 0x48, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x3e, 0x0a, 0x0c, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x0c, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x74, 0x68, - 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x15, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x69, - 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x0b, - 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, - 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, - 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, + 0x6e, 0x49, 0x44, 0x22, 0x38, 0x0a, 0x1e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x4f, 0x70, + 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x22, 0x8f, 0x01, + 0x0a, 0x20, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x2d, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, + 0x47, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x34, 0x22, 0x42, 0x0a, 0x06, 0x43, 0x75, 0x72, 0x73, + 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x6d, 0x65, 0x53, 0x74, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x6d, 0x65, 0x53, 0x74, 0x72, 0x12, 0x1e, 0x0a, 0x0a, + 0x6e, 0x65, 0x78, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0xc6, 0x03, 0x0a, + 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x30, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, + 0x74, 0x49, 0x44, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, + 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6d, + 0x70, 0x49, 0x44, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6d, 0x70, 0x49, 0x44, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x73, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x09, 0x72, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa1, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x4b, 0x0a, 0x10, + 0x72, 0x65, 0x70, 0x6c, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0x12, 0x0a, 0x10, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xcb, 0x01, + 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x28, 0x0a, + 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x47, 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x12, 0x41, 0x0a, 0x0c, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc6, 0x02, 0x0a, 0x0c, + 0x4d, 0x65, 0x64, 0x69, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x06, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x64, + 0x69, 0x61, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x2d, 0x0a, + 0x06, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x50, 0x69, + 0x78, 0x65, 0x6c, 0x73, 0x52, 0x06, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x44, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x49, 0x44, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x49, 0x44, 0x32, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x64, + 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x0e, + 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x32, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x4b, 0x65, 0x79, 0x32, 0x22, 0x36, 0x0a, 0x06, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x2a, 0x0a, 0x0e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x1d, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x75, 0x62, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, + 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, + 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x54, 0x65, 0x78, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x69, 0x72, 0x64, 0x43, 0x6f, + 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x68, 0x69, 0x72, 0x64, 0x43, + 0x6f, 0x64, 0x65, 0x22, 0x52, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc4, 0x04, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, 0x61, 0x74, 0x65, + 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x69, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x12, 0x2c, 0x0a, 0x11, + 0x73, 0x65, 0x6c, 0x66, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, + 0x44, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, 0x6c, 0x66, 0x50, 0x61, 0x72, + 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x48, 0x65, 0x78, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x76, 0x61, 0x74, + 0x61, 0x72, 0x48, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x28, 0x0a, 0x0f, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x49, 0x44, 0x12, 0x3e, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, + 0x61, 0x6e, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, + 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, + 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x50, 0x61, 0x72, + 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x11, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, + 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x69, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x1d, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x74, 0x68, 0x69, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x22, 0x81, + 0x03, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x28, + 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x6d, 0x61, 0x6c, 0x6c, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x02, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, + 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x48, 0x65, 0x78, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x76, 0x61, 0x74, + 0x61, 0x72, 0x48, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4d, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x75, - 0x74, 0x65, 0x64, 0x52, 0x05, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x76, - 0x61, 0x74, 0x61, 0x72, 0x49, 0x44, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x76, - 0x61, 0x74, 0x61, 0x72, 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x73, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x02, 0x62, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x74, 0x65, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x22, 0x62, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x24, - 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x44, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, - 0x6e, 0x74, 0x49, 0x44, 0x22, 0x63, 0x0a, 0x0d, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x4d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x4d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, - 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x39, 0x0a, 0x07, 0x55, 0x6e, 0x6b, - 0x6e, 0x6f, 0x77, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x12, 0x16, 0x0a, 0x06, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x32, 0x22, 0x21, 0x0a, 0x05, 0x4d, 0x75, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, - 0x07, 0x69, 0x73, 0x4d, 0x75, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x69, 0x73, 0x4d, 0x75, 0x74, 0x65, 0x64, 0x2a, 0xa0, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, 0x12, 0x09, - 0x0a, 0x05, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x49, 0x44, - 0x45, 0x4f, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x10, 0x04, 0x12, - 0x0e, 0x0a, 0x0a, 0x41, 0x54, 0x54, 0x41, 0x43, 0x48, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x05, 0x12, - 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x12, 0x0d, 0x0a, - 0x09, 0x52, 0x49, 0x43, 0x48, 0x5f, 0x43, 0x41, 0x52, 0x44, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, - 0x56, 0x43, 0x41, 0x52, 0x44, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x4d, 0x53, 0x5f, 0x4e, - 0x45, 0x45, 0x44, 0x53, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x09, 0x12, - 0x09, 0x0a, 0x05, 0x52, 0x45, 0x50, 0x4c, 0x59, 0x10, 0x0a, 0x2a, 0x44, 0x0a, 0x0d, 0x4d, 0x73, - 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x00, 0x12, - 0x08, 0x0a, 0x04, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x4e, - 0x44, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x45, 0x41, 0x44, 0x10, 0x0b, - 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x65, 0x64, 0x52, 0x05, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, + 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x6f, 0x6d, + 0x65, 0x49, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x44, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x44, + 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x62, 0x73, + 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x74, 0x65, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6f, + 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x31, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x6f, + 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x31, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6f, 0x6d, 0x65, 0x49, 0x6e, + 0x74, 0x32, 0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x6f, 0x6d, 0x65, 0x49, 0x6e, + 0x74, 0x32, 0x22, 0x5d, 0x0a, 0x09, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, + 0x44, 0x22, 0xc7, 0x01, 0x0a, 0x0d, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, + 0x72, 0x6f, 0x6d, 0x4d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x72, 0x6f, + 0x6d, 0x4d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x54, 0x0a, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x69, 0x0a, 0x13, 0x4c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x12, 0x38, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x21, 0x0a, 0x05, 0x4d, 0x75, 0x74, 0x65, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x69, 0x73, 0x4d, 0x75, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x69, 0x73, 0x4d, 0x75, 0x74, 0x65, 0x64, 0x2a, 0xc2, 0x18, 0x0a, 0x11, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, + 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x55, + 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x45, 0x44, + 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x44, + 0x49, 0x53, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x44, 0x10, 0x0b, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x55, + 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x52, 0x41, 0x46, 0x54, 0x10, 0x03, 0x12, 0x22, + 0x0a, 0x1e, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, + 0x41, 0x46, 0x54, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, + 0x10, 0x0a, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x59, + 0x45, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, + 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, + 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x52, + 0x45, 0x53, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x55, + 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, + 0x52, 0x45, 0x54, 0x52, 0x59, 0x10, 0x07, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x55, 0x54, 0x47, 0x4f, + 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, + 0x49, 0x43, 0x10, 0x08, 0x12, 0x24, 0x0a, 0x20, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, + 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x45, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x4e, 0x43, + 0x59, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x09, 0x12, 0x15, 0x0a, 0x11, 0x4f, 0x55, + 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, + 0x0c, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x0d, + 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x4e, 0x4f, 0x54, + 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x59, 0x45, 0x54, 0x10, 0x0e, + 0x12, 0x1f, 0x0a, 0x1b, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x56, + 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, + 0x0f, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x43, + 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x10, 0x12, 0x26, 0x0a, 0x22, 0x4f, 0x55, 0x54, + 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x43, + 0x49, 0x50, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x4f, 0x53, 0x54, 0x5f, 0x52, 0x43, 0x53, 0x10, + 0x11, 0x12, 0x28, 0x0a, 0x24, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4e, 0x4f, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x59, 0x5f, 0x4e, 0x4f, + 0x5f, 0x46, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x12, 0x12, 0x2d, 0x0a, 0x29, 0x4f, + 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x52, + 0x45, 0x43, 0x49, 0x50, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x4f, 0x54, + 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x10, 0x13, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x55, + 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, + 0x47, 0x10, 0x14, 0x12, 0x2d, 0x0a, 0x29, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, + 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x43, 0x49, 0x50, 0x49, 0x45, 0x4e, 0x54, + 0x5f, 0x4c, 0x4f, 0x53, 0x54, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x10, 0x15, 0x12, 0x3b, 0x0a, 0x37, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x43, 0x49, 0x50, 0x49, 0x45, 0x4e, 0x54, 0x5f, + 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x5f, + 0x4e, 0x4f, 0x5f, 0x4d, 0x4f, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x59, 0x10, 0x16, 0x12, + 0x15, 0x0a, 0x11, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x4f, 0x4d, 0x50, + 0x4c, 0x45, 0x54, 0x45, 0x10, 0x64, 0x12, 0x23, 0x0a, 0x1f, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x49, + 0x4e, 0x47, 0x5f, 0x59, 0x45, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x55, 0x41, 0x4c, + 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x65, 0x12, 0x25, 0x0a, 0x21, 0x49, + 0x4e, 0x43, 0x4f, 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x59, 0x49, 0x4e, 0x47, + 0x5f, 0x4d, 0x41, 0x4e, 0x55, 0x41, 0x4c, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, + 0x10, 0x66, 0x12, 0x1f, 0x0a, 0x1b, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x4d, + 0x41, 0x4e, 0x55, 0x41, 0x4c, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x49, 0x4e, + 0x47, 0x10, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x49, 0x4e, 0x47, 0x5f, + 0x52, 0x45, 0x54, 0x52, 0x59, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x44, 0x4f, + 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x68, 0x12, 0x1d, 0x0a, 0x19, 0x49, 0x4e, 0x43, 0x4f, + 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, + 0x41, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x69, 0x12, 0x1c, 0x0a, 0x18, 0x49, 0x4e, 0x43, 0x4f, 0x4d, + 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x46, 0x41, 0x49, + 0x4c, 0x45, 0x44, 0x10, 0x6a, 0x12, 0x25, 0x0a, 0x21, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x49, 0x4e, + 0x47, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, + 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x6b, 0x12, 0x16, 0x0a, 0x12, + 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, + 0x45, 0x44, 0x10, 0x6c, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x49, 0x4e, 0x47, + 0x5f, 0x44, 0x49, 0x53, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x44, 0x10, 0x6d, 0x12, 0x1e, 0x0a, 0x1a, + 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, + 0x44, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x6e, 0x12, 0x26, 0x0a, 0x22, + 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, + 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, + 0x47, 0x45, 0x10, 0x6f, 0x12, 0x2c, 0x0a, 0x28, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x49, 0x4e, 0x47, + 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, + 0x5f, 0x53, 0x49, 0x4d, 0x5f, 0x48, 0x41, 0x53, 0x5f, 0x4e, 0x4f, 0x5f, 0x44, 0x41, 0x54, 0x41, + 0x10, 0x70, 0x12, 0x1e, 0x0a, 0x1a, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x4f, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, + 0x10, 0x71, 0x12, 0x1f, 0x0a, 0x1b, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x44, + 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x4f, 0x52, 0x54, 0x45, + 0x44, 0x10, 0x72, 0x12, 0x20, 0x0a, 0x1b, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, + 0x5f, 0x4d, 0x4d, 0x53, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x45, 0x44, 0x10, 0xcc, 0x01, 0x12, 0x24, 0x0a, 0x1f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, + 0x4e, 0x45, 0x5f, 0x53, 0x4d, 0x53, 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, + 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0xcd, 0x01, 0x12, 0x25, 0x0a, 0x20, 0x54, + 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, + 0x4f, 0x4e, 0x45, 0x5f, 0x53, 0x4d, 0x53, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, + 0xce, 0x01, 0x12, 0x25, 0x0a, 0x20, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, + 0x4f, 0x4e, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x4f, 0x4e, 0x45, 0x5f, 0x52, 0x43, 0x53, 0x5f, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0xcf, 0x01, 0x12, 0x22, 0x0a, 0x1d, 0x54, 0x4f, 0x4d, + 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x4f, + 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x4d, 0x4d, 0x53, 0x10, 0xd0, 0x01, 0x12, 0x26, 0x0a, + 0x21, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, + 0x48, 0x5f, 0x54, 0x4f, 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x53, + 0x4d, 0x53, 0x10, 0xd1, 0x01, 0x12, 0x21, 0x0a, 0x1c, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, + 0x4e, 0x45, 0x5f, 0x53, 0x48, 0x4f, 0x57, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x50, 0x52, 0x45, + 0x56, 0x49, 0x45, 0x57, 0x53, 0x10, 0xd2, 0x01, 0x12, 0x22, 0x0a, 0x1d, 0x54, 0x4f, 0x4d, 0x42, + 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x52, 0x45, 0x4e, 0x41, + 0x4d, 0x45, 0x44, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x10, 0xd3, 0x01, 0x12, 0x26, 0x0a, 0x21, + 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x5f, 0x53, 0x4d, 0x53, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x42, 0x4c, + 0x45, 0x10, 0xd4, 0x01, 0x12, 0x2f, 0x0a, 0x2a, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, + 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x4f, 0x4e, 0x45, 0x5f, + 0x4f, 0x4e, 0x5f, 0x4f, 0x4e, 0x45, 0x5f, 0x52, 0x43, 0x53, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x45, 0x44, 0x10, 0xd5, 0x01, 0x12, 0x26, 0x0a, 0x21, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, + 0x4e, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x53, 0x57, 0x49, 0x54, + 0x43, 0x48, 0x5f, 0x54, 0x4f, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x10, 0xd6, 0x01, 0x12, 0x25, 0x0a, + 0x20, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, + 0x43, 0x4f, 0x4c, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x4f, 0x5f, 0x52, 0x43, + 0x53, 0x10, 0xd7, 0x01, 0x12, 0x2f, 0x0a, 0x2a, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, + 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, + 0x48, 0x5f, 0x54, 0x4f, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, + 0x43, 0x53, 0x10, 0xd8, 0x01, 0x12, 0x23, 0x0a, 0x1e, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, + 0x4e, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x52, 0x45, 0x4e, 0x41, 0x4d, 0x45, 0x44, + 0x5f, 0x47, 0x4c, 0x4f, 0x42, 0x41, 0x4c, 0x10, 0xd9, 0x01, 0x12, 0x28, 0x0a, 0x23, 0x54, 0x4f, + 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x4e, 0x41, + 0x4d, 0x45, 0x5f, 0x43, 0x4c, 0x45, 0x41, 0x52, 0x45, 0x44, 0x5f, 0x47, 0x4c, 0x4f, 0x42, 0x41, + 0x4c, 0x10, 0xda, 0x01, 0x12, 0x34, 0x0a, 0x2f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, + 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, + 0x48, 0x5f, 0x54, 0x4f, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, + 0x43, 0x53, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xdb, 0x01, 0x12, 0x26, 0x0a, 0x21, 0x54, 0x4f, + 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x53, 0x45, 0x4c, 0x46, 0x5f, 0x52, 0x45, 0x4d, + 0x4f, 0x56, 0x45, 0x44, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, + 0xdc, 0x01, 0x12, 0x3c, 0x0a, 0x37, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x50, + 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, 0x41, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, + 0x45, 0x44, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0xdd, 0x01, + 0x12, 0x3b, 0x0a, 0x36, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x53, 0x4d, 0x53, + 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, 0x41, 0x4e, + 0x54, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x44, 0x10, 0xde, 0x01, 0x12, 0x3b, 0x0a, + 0x36, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x52, 0x43, 0x53, 0x5f, 0x4e, 0x4f, + 0x52, 0x4d, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, 0x41, 0x4e, 0x54, 0x5f, 0x55, + 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x44, 0x10, 0xdf, 0x01, 0x12, 0x45, 0x0a, 0x40, 0x4d, 0x45, + 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, + 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x45, 0x44, + 0x5f, 0x52, 0x43, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, + 0x49, 0x50, 0x41, 0x4e, 0x54, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x44, 0x10, 0xe0, + 0x01, 0x12, 0x40, 0x0a, 0x3b, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x45, 0x4e, + 0x43, 0x52, 0x59, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x50, 0x41, + 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, 0x41, 0x4e, 0x54, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x45, 0x44, + 0x10, 0xe1, 0x01, 0x12, 0x45, 0x0a, 0x40, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, + 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, + 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, 0x41, 0x4e, 0x54, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, + 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe2, 0x01, 0x12, 0x3e, 0x0a, 0x39, 0x4d, 0x45, + 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, + 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x45, 0x44, + 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, 0x41, + 0x4e, 0x54, 0x5f, 0x4c, 0x45, 0x46, 0x54, 0x10, 0xe3, 0x01, 0x12, 0x37, 0x0a, 0x32, 0x4d, 0x45, + 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, + 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x45, 0x44, + 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x53, 0x45, 0x4c, 0x46, 0x5f, 0x4c, 0x45, 0x46, 0x54, + 0x10, 0xe4, 0x01, 0x12, 0x35, 0x0a, 0x30, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, + 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, + 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0xe5, 0x01, 0x12, 0x3f, 0x0a, 0x3a, 0x4d, 0x45, + 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, + 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x53, 0x45, 0x4c, 0x46, 0x5f, 0x52, 0x45, 0x4d, 0x4f, + 0x56, 0x45, 0x44, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, + 0x45, 0x44, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0xe6, 0x01, 0x12, 0x46, 0x0a, 0x41, 0x4d, + 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, + 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, + 0x41, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x5f, 0x46, 0x52, 0x4f, 0x4d, + 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, + 0x10, 0xe7, 0x01, 0x12, 0x40, 0x0a, 0x3b, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, + 0x53, 0x55, 0x47, 0x47, 0x45, 0x53, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x48, 0x4f, 0x52, 0x54, + 0x43, 0x55, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x5f, 0x54, 0x4f, 0x4f, 0x4c, 0x53, 0x54, 0x4f, + 0x4e, 0x45, 0x10, 0xe8, 0x01, 0x12, 0x3f, 0x0a, 0x3a, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, + 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, + 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x5f, 0x52, 0x43, 0x53, 0x5f, 0x54, 0x4f, 0x5f, 0x45, + 0x32, 0x45, 0x45, 0x10, 0xe9, 0x01, 0x12, 0x3f, 0x0a, 0x3a, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, + 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, + 0x4e, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, + 0x4c, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x5f, 0x45, 0x32, 0x45, 0x45, 0x5f, 0x54, 0x4f, + 0x5f, 0x52, 0x43, 0x53, 0x10, 0xea, 0x01, 0x12, 0x3a, 0x0a, 0x35, 0x4d, 0x45, 0x53, 0x53, 0x41, + 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, + 0x4f, 0x4e, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x53, 0x57, 0x49, + 0x54, 0x43, 0x48, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x45, 0x32, 0x45, 0x45, + 0x10, 0xeb, 0x01, 0x12, 0x3a, 0x0a, 0x35, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, + 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x5f, + 0x45, 0x32, 0x45, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x10, 0xec, 0x01, 0x12, + 0x39, 0x0a, 0x34, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, + 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x5f, 0x52, 0x43, 0x53, 0x5f, + 0x54, 0x4f, 0x5f, 0x45, 0x32, 0x45, 0x45, 0x10, 0xed, 0x01, 0x12, 0x39, 0x0a, 0x34, 0x4d, 0x45, + 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, + 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, + 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x5f, 0x45, 0x32, 0x45, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x52, + 0x43, 0x53, 0x10, 0xee, 0x01, 0x12, 0x31, 0x0a, 0x2c, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, + 0x45, 0x5f, 0x53, 0x41, 0x54, 0x45, 0x4c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x44, 0x55, 0x43, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0xef, 0x01, 0x12, 0x14, 0x0a, 0x0f, 0x4d, 0x45, 0x53, 0x53, + 0x41, 0x47, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0xac, 0x02, 0x2a, 0x50, + 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x41, 0x52, + 0x43, 0x48, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x52, 0x43, 0x48, 0x49, + 0x56, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, + 0x2a, 0x63, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x15, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x42, 0x4c, 0x4f, + 0x43, 0x4b, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x07, 0x12, + 0x14, 0x0a, 0x10, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x50, + 0x4f, 0x52, 0x54, 0x10, 0x08, 0x2a, 0x2e, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x4d, 0x55, 0x54, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4d, + 0x55, 0x54, 0x45, 0x10, 0x01, 0x2a, 0x79, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x76, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x0e, + 0x0a, 0x0a, 0x55, 0x4e, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, + 0x0a, 0x08, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, + 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x4c, 0x4f, + 0x43, 0x4b, 0x45, 0x44, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x45, + 0x44, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x06, + 0x2a, 0xfb, 0x03, 0x0a, 0x0c, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x73, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4d, 0x41, 0x47, 0x45, + 0x5f, 0x4a, 0x50, 0x45, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4d, 0x41, 0x47, 0x45, + 0x5f, 0x4a, 0x50, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, + 0x50, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x47, + 0x49, 0x46, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x57, 0x42, + 0x4d, 0x50, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x58, 0x5f, + 0x4d, 0x53, 0x5f, 0x42, 0x4d, 0x50, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x4d, 0x41, 0x47, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x07, 0x12, + 0x0d, 0x0a, 0x09, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x4d, 0x50, 0x34, 0x10, 0x08, 0x12, 0x0d, + 0x0a, 0x09, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x33, 0x47, 0x32, 0x10, 0x09, 0x12, 0x0e, 0x0a, + 0x0a, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x33, 0x47, 0x50, 0x50, 0x10, 0x0a, 0x12, 0x0e, 0x0a, + 0x0a, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x57, 0x45, 0x42, 0x4d, 0x10, 0x0b, 0x12, 0x0d, 0x0a, + 0x09, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x4d, 0x4b, 0x56, 0x10, 0x0c, 0x12, 0x15, 0x0a, 0x11, + 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x41, 0x41, 0x43, + 0x10, 0x0e, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x41, 0x4d, 0x52, 0x10, + 0x0f, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x4d, 0x50, 0x33, 0x10, 0x10, + 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x4d, 0x50, 0x45, 0x47, 0x10, 0x11, + 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x4d, 0x50, 0x47, 0x10, 0x12, 0x12, + 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x4d, 0x50, 0x34, 0x10, 0x13, 0x12, 0x12, + 0x0a, 0x0e, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x4d, 0x50, 0x34, 0x5f, 0x4c, 0x41, 0x54, 0x4d, + 0x10, 0x14, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x33, 0x47, 0x50, 0x50, + 0x10, 0x15, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x4f, 0x47, 0x47, 0x10, + 0x16, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x17, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x45, 0x58, 0x54, + 0x5f, 0x56, 0x43, 0x41, 0x52, 0x44, 0x10, 0x18, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x50, 0x50, 0x5f, + 0x50, 0x44, 0x46, 0x10, 0x1c, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x50, 0x50, 0x5f, 0x54, 0x58, 0x54, + 0x10, 0x1d, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x50, 0x50, 0x5f, 0x48, 0x54, 0x4d, 0x4c, 0x10, 0x1e, + 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x4f, 0x47, 0x47, 0x32, 0x10, 0x1f, + 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x50, 0x50, 0x5f, 0x53, 0x4d, 0x49, 0x4c, 0x10, 0x20, 0x42, 0x0e, + 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1987,61 +3298,83 @@ func file_conversations_proto_rawDescGZIP() []byte { return file_conversations_proto_rawDescData } -var file_conversations_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_conversations_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_conversations_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_conversations_proto_msgTypes = make([]protoimpl.MessageInfo, 31) var file_conversations_proto_goTypes = []interface{}{ - (MessageType)(0), // 0: conversations.MessageType - (MsgStatusCode)(0), // 1: conversations.MsgStatusCode - (*SendMessagePayload)(nil), // 2: conversations.SendMessagePayload - (*MessagePayload)(nil), // 3: conversations.MessagePayload - (*MessagePayloadContent)(nil), // 4: conversations.MessagePayloadContent - (*OpenConversationPayload)(nil), // 5: conversations.OpenConversationPayload - (*PrepareOpenConversationPayload)(nil), // 6: conversations.PrepareOpenConversationPayload - (*FetchConversationMessagesPayload)(nil), // 7: conversations.FetchConversationMessagesPayload - (*ListCoversationsPayload)(nil), // 8: conversations.ListCoversationsPayload - (*FetchMessagesResponse)(nil), // 9: conversations.FetchMessagesResponse - (*Cursor)(nil), // 10: conversations.Cursor - (*Message)(nil), // 11: conversations.Message - (*MessageInfo)(nil), // 12: conversations.MessageInfo - (*ImageContent)(nil), // 13: conversations.ImageContent - (*ImagePixels)(nil), // 14: conversations.ImagePixels - (*MessageContent)(nil), // 15: conversations.MessageContent - (*IsFromMe)(nil), // 16: conversations.IsFromMe - (*MessageStatus)(nil), // 17: conversations.MessageStatus - (*Conversations)(nil), // 18: conversations.Conversations - (*Conversation)(nil), // 19: conversations.Conversation - (*Participant)(nil), // 20: conversations.Participant - (*UserIdentifier)(nil), // 21: conversations.UserIdentifier - (*LatestMessage)(nil), // 22: conversations.LatestMessage - (*Unknown)(nil), // 23: conversations.Unknown - (*Muted)(nil), // 24: conversations.Muted + (MessageStatusType)(0), // 0: conversations.MessageStatusType + (ConversationStatus)(0), // 1: conversations.ConversationStatus + (ConversationActionStatus)(0), // 2: conversations.ConversationActionStatus + (ConversationMuteStatus)(0), // 3: conversations.ConversationMuteStatus + (ConvUpdateTypes)(0), // 4: conversations.ConvUpdateTypes + (MediaFormats)(0), // 5: conversations.MediaFormats + (*ResendMessagePayload)(nil), // 6: conversations.ResendMessagePayload + (*ConversationTypePayload)(nil), // 7: conversations.ConversationTypePayload + (*UpdateConversationPayload)(nil), // 8: conversations.UpdateConversationPayload + (*ConversationAction5)(nil), // 9: conversations.ConversationAction5 + (*UpdateConversationData)(nil), // 10: conversations.UpdateConversationData + (*DeleteMessagePayload)(nil), // 11: conversations.DeleteMessagePayload + (*SendMessagePayload)(nil), // 12: conversations.SendMessagePayload + (*ReplyPayload)(nil), // 13: conversations.ReplyPayload + (*MessagePayload)(nil), // 14: conversations.MessagePayload + (*MessagePayloadContent)(nil), // 15: conversations.MessagePayloadContent + (*OpenConversationPayload)(nil), // 16: conversations.OpenConversationPayload + (*PrepareOpenConversationPayload)(nil), // 17: conversations.PrepareOpenConversationPayload + (*FetchConversationMessagesPayload)(nil), // 18: conversations.FetchConversationMessagesPayload + (*ListCoversationsPayload)(nil), // 19: conversations.ListCoversationsPayload + (*Cursor)(nil), // 20: conversations.Cursor + (*Message)(nil), // 21: conversations.Message + (*ReplyMessage)(nil), // 22: conversations.ReplyMessage + (*ReplyMessageData)(nil), // 23: conversations.ReplyMessageData + (*MessageInfo)(nil), // 24: conversations.MessageInfo + (*MediaContent)(nil), // 25: conversations.MediaContent + (*Pixels)(nil), // 26: conversations.Pixels + (*MessageContent)(nil), // 27: conversations.MessageContent + (*MsgType)(nil), // 28: conversations.MsgType + (*MessageStatus)(nil), // 29: conversations.MessageStatus + (*Conversations)(nil), // 30: conversations.Conversations + (*Conversation)(nil), // 31: conversations.Conversation + (*Participant)(nil), // 32: conversations.Participant + (*SmallInfo)(nil), // 33: conversations.SmallInfo + (*LatestMessage)(nil), // 34: conversations.LatestMessage + (*LatestMessageStatus)(nil), // 35: conversations.LatestMessageStatus + (*Muted)(nil), // 36: conversations.Muted + (*ReactionResponse)(nil), // 37: reactions.ReactionResponse } var file_conversations_proto_depIdxs = []int32{ - 3, // 0: conversations.SendMessagePayload.messagePayload:type_name -> conversations.MessagePayload - 4, // 1: conversations.MessagePayload.messagePayloadContent:type_name -> conversations.MessagePayloadContent - 12, // 2: conversations.MessagePayload.messageInfo:type_name -> conversations.MessageInfo - 15, // 3: conversations.MessagePayloadContent.messageContent:type_name -> conversations.MessageContent - 10, // 4: conversations.FetchConversationMessagesPayload.cursor:type_name -> conversations.Cursor - 11, // 5: conversations.FetchMessagesResponse.messages:type_name -> conversations.Message - 10, // 6: conversations.FetchMessagesResponse.cursor:type_name -> conversations.Cursor - 16, // 7: conversations.Message.from:type_name -> conversations.IsFromMe - 17, // 8: conversations.Message.messageStatus:type_name -> conversations.MessageStatus - 12, // 9: conversations.Message.messageInfo:type_name -> conversations.MessageInfo - 0, // 10: conversations.Message.type:type_name -> conversations.MessageType - 15, // 11: conversations.MessageInfo.messageContent:type_name -> conversations.MessageContent - 13, // 12: conversations.MessageInfo.imageContent:type_name -> conversations.ImageContent - 14, // 13: conversations.ImageContent.pixels:type_name -> conversations.ImagePixels - 1, // 14: conversations.MessageStatus.code:type_name -> conversations.MsgStatusCode - 19, // 15: conversations.Conversations.conversations:type_name -> conversations.Conversation - 22, // 16: conversations.Conversation.latestMessage:type_name -> conversations.LatestMessage - 20, // 17: conversations.Conversation.participants:type_name -> conversations.Participant - 21, // 18: conversations.Participant.id:type_name -> conversations.UserIdentifier - 24, // 19: conversations.Participant.muted:type_name -> conversations.Muted - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 10, // 0: conversations.UpdateConversationPayload.data:type_name -> conversations.UpdateConversationData + 2, // 1: conversations.UpdateConversationPayload.action:type_name -> conversations.ConversationActionStatus + 9, // 2: conversations.UpdateConversationPayload.action5:type_name -> conversations.ConversationAction5 + 1, // 3: conversations.UpdateConversationData.status:type_name -> conversations.ConversationStatus + 3, // 4: conversations.UpdateConversationData.mute:type_name -> conversations.ConversationMuteStatus + 14, // 5: conversations.SendMessagePayload.messagePayload:type_name -> conversations.MessagePayload + 13, // 6: conversations.SendMessagePayload.reply:type_name -> conversations.ReplyPayload + 15, // 7: conversations.MessagePayload.messagePayloadContent:type_name -> conversations.MessagePayloadContent + 24, // 8: conversations.MessagePayload.messageInfo:type_name -> conversations.MessageInfo + 27, // 9: conversations.MessagePayloadContent.messageContent:type_name -> conversations.MessageContent + 20, // 10: conversations.FetchConversationMessagesPayload.cursor:type_name -> conversations.Cursor + 28, // 11: conversations.Message.msgType:type_name -> conversations.MsgType + 29, // 12: conversations.Message.messageStatus:type_name -> conversations.MessageStatus + 24, // 13: conversations.Message.messageInfo:type_name -> conversations.MessageInfo + 37, // 14: conversations.Message.reactions:type_name -> reactions.ReactionResponse + 23, // 15: conversations.ReplyMessage.replyMessageData:type_name -> conversations.ReplyMessageData + 27, // 16: conversations.MessageInfo.messageContent:type_name -> conversations.MessageContent + 25, // 17: conversations.MessageInfo.mediaContent:type_name -> conversations.MediaContent + 5, // 18: conversations.MediaContent.format:type_name -> conversations.MediaFormats + 26, // 19: conversations.MediaContent.pixels:type_name -> conversations.Pixels + 0, // 20: conversations.MessageStatus.status:type_name -> conversations.MessageStatusType + 31, // 21: conversations.Conversations.conversations:type_name -> conversations.Conversation + 34, // 22: conversations.Conversation.latestMessage:type_name -> conversations.LatestMessage + 4, // 23: conversations.Conversation.status:type_name -> conversations.ConvUpdateTypes + 32, // 24: conversations.Conversation.participants:type_name -> conversations.Participant + 33, // 25: conversations.Participant.ID:type_name -> conversations.SmallInfo + 36, // 26: conversations.Participant.muted:type_name -> conversations.Muted + 35, // 27: conversations.LatestMessage.latestMessageStatus:type_name -> conversations.LatestMessageStatus + 0, // 28: conversations.LatestMessageStatus.status:type_name -> conversations.MessageStatusType + 29, // [29:29] is the sub-list for method output_type + 29, // [29:29] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_conversations_proto_init() } @@ -2049,9 +3382,10 @@ func file_conversations_proto_init() { if File_conversations_proto != nil { return } + file_reactions_proto_init() if !protoimpl.UnsafeEnabled { file_conversations_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendMessagePayload); i { + switch v := v.(*ResendMessagePayload); i { case 0: return &v.state case 1: @@ -2063,7 +3397,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessagePayload); i { + switch v := v.(*ConversationTypePayload); i { case 0: return &v.state case 1: @@ -2075,7 +3409,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessagePayloadContent); i { + switch v := v.(*UpdateConversationPayload); i { case 0: return &v.state case 1: @@ -2087,7 +3421,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenConversationPayload); i { + switch v := v.(*ConversationAction5); i { case 0: return &v.state case 1: @@ -2099,7 +3433,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrepareOpenConversationPayload); i { + switch v := v.(*UpdateConversationData); i { case 0: return &v.state case 1: @@ -2111,7 +3445,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchConversationMessagesPayload); i { + switch v := v.(*DeleteMessagePayload); i { case 0: return &v.state case 1: @@ -2123,7 +3457,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListCoversationsPayload); i { + switch v := v.(*SendMessagePayload); i { case 0: return &v.state case 1: @@ -2135,7 +3469,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchMessagesResponse); i { + switch v := v.(*ReplyPayload); i { case 0: return &v.state case 1: @@ -2147,7 +3481,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cursor); i { + switch v := v.(*MessagePayload); i { case 0: return &v.state case 1: @@ -2159,7 +3493,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message); i { + switch v := v.(*MessagePayloadContent); i { case 0: return &v.state case 1: @@ -2171,7 +3505,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageInfo); i { + switch v := v.(*OpenConversationPayload); i { case 0: return &v.state case 1: @@ -2183,7 +3517,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImageContent); i { + switch v := v.(*PrepareOpenConversationPayload); i { case 0: return &v.state case 1: @@ -2195,7 +3529,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImagePixels); i { + switch v := v.(*FetchConversationMessagesPayload); i { case 0: return &v.state case 1: @@ -2207,7 +3541,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageContent); i { + switch v := v.(*ListCoversationsPayload); i { case 0: return &v.state case 1: @@ -2219,7 +3553,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsFromMe); i { + switch v := v.(*Cursor); i { case 0: return &v.state case 1: @@ -2231,7 +3565,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageStatus); i { + switch v := v.(*Message); i { case 0: return &v.state case 1: @@ -2243,7 +3577,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Conversations); i { + switch v := v.(*ReplyMessage); i { case 0: return &v.state case 1: @@ -2255,7 +3589,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Conversation); i { + switch v := v.(*ReplyMessageData); i { case 0: return &v.state case 1: @@ -2267,7 +3601,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Participant); i { + switch v := v.(*MessageInfo); i { case 0: return &v.state case 1: @@ -2279,7 +3613,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserIdentifier); i { + switch v := v.(*MediaContent); i { case 0: return &v.state case 1: @@ -2291,7 +3625,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LatestMessage); i { + switch v := v.(*Pixels); i { case 0: return &v.state case 1: @@ -2303,7 +3637,7 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Unknown); i { + switch v := v.(*MessageContent); i { case 0: return &v.state case 1: @@ -2315,6 +3649,102 @@ func file_conversations_proto_init() { } } file_conversations_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_conversations_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessageStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_conversations_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Conversations); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_conversations_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Conversation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_conversations_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Participant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_conversations_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmallInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_conversations_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LatestMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_conversations_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LatestMessageStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_conversations_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Muted); i { case 0: return &v.state @@ -2327,17 +3757,21 @@ func file_conversations_proto_init() { } } } - file_conversations_proto_msgTypes[10].OneofWrappers = []interface{}{ + file_conversations_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*UpdateConversationData_Status)(nil), + (*UpdateConversationData_Mute)(nil), + } + file_conversations_proto_msgTypes[18].OneofWrappers = []interface{}{ (*MessageInfo_MessageContent)(nil), - (*MessageInfo_ImageContent)(nil), + (*MessageInfo_MediaContent)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_conversations_proto_rawDesc, - NumEnums: 2, - NumMessages: 23, + NumEnums: 6, + NumMessages: 31, NumExtensions: 0, NumServices: 0, }, diff --git a/libgm/binary/events.pb.go b/libgm/binary/events.pb.go index 9013de4..dddb732 100644 --- a/libgm/binary/events.pb.go +++ b/libgm/binary/events.pb.go @@ -20,21 +20,254 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type Event struct { +type AlertType int32 + +const ( + AlertType_ALERT_TYPE_UNKNOWN AlertType = 0 + AlertType_BROWSER_INACTIVE AlertType = 1 // Emitted whenever browser connection becomes inactive + AlertType_BROWSER_ACTIVE AlertType = 2 // Emitted whenever a new browser session is created + AlertType_MOBILE_DATA_CONNECTION AlertType = 3 // Emitted when the paired device connects to data + AlertType_MOBILE_WIFI_CONNECTION AlertType = 4 // Emitted when the paired device connects to wifi + AlertType_MOBILE_BATTERY_LOW AlertType = 5 // Emitted if the paired device reaches low battery + AlertType_MOBILE_BATTERY_RESTORED AlertType = 6 // Emitted if the paired device has restored battery enough to not be considered low + AlertType_BROWSER_INACTIVE_FROM_TIMEOUT AlertType = 7 // Emitted whenever browser connection becomes inactive due to timeout + AlertType_BROWSER_INACTIVE_FROM_INACTIVITY AlertType = 8 // Emitted whenever browser connection becomes inactive due to inactivity + AlertType_RCS_CONNECTION AlertType = 9 // Emitted whenever RCS connection has been established successfully + AlertType_OBSERVER_REGISTERED AlertType = 10 // Unknown + AlertType_MOBILE_DATABASE_SYNCING AlertType = 11 // Emitted whenever the paired device is attempting to sync db + AlertType_MOBILE_DATABASE_SYNC_COMPLETE AlertType = 12 // Emitted whenever the paired device has completed the db sync + AlertType_MOBILE_DATABASE_SYNC_STARTED AlertType = 13 // Emitted whenever the paired device has begun syncing the db + AlertType_MOBILE_DATABASE_PARTIAL_SYNC_COMPLETED AlertType = 14 // Emitted whenever the paired device has successfully synced a chunk of the db + AlertType_MOBILE_DATABASE_PARTIAL_SYNC_STARTED AlertType = 15 // Emitted whenever the paired device has begun syncing a chunk of the db + AlertType_CONTACTS_REFRESH_STARTED AlertType = 16 // Emitted whenever the paired device has begun refreshing contacts + AlertType_CONTACTS_REFRESH_COMPLETED AlertType = 17 // Emitted whenever the paired device has successfully refreshed contacts +) + +// Enum value maps for AlertType. +var ( + AlertType_name = map[int32]string{ + 0: "ALERT_TYPE_UNKNOWN", + 1: "BROWSER_INACTIVE", + 2: "BROWSER_ACTIVE", + 3: "MOBILE_DATA_CONNECTION", + 4: "MOBILE_WIFI_CONNECTION", + 5: "MOBILE_BATTERY_LOW", + 6: "MOBILE_BATTERY_RESTORED", + 7: "BROWSER_INACTIVE_FROM_TIMEOUT", + 8: "BROWSER_INACTIVE_FROM_INACTIVITY", + 9: "RCS_CONNECTION", + 10: "OBSERVER_REGISTERED", + 11: "MOBILE_DATABASE_SYNCING", + 12: "MOBILE_DATABASE_SYNC_COMPLETE", + 13: "MOBILE_DATABASE_SYNC_STARTED", + 14: "MOBILE_DATABASE_PARTIAL_SYNC_COMPLETED", + 15: "MOBILE_DATABASE_PARTIAL_SYNC_STARTED", + 16: "CONTACTS_REFRESH_STARTED", + 17: "CONTACTS_REFRESH_COMPLETED", + } + AlertType_value = map[string]int32{ + "ALERT_TYPE_UNKNOWN": 0, + "BROWSER_INACTIVE": 1, + "BROWSER_ACTIVE": 2, + "MOBILE_DATA_CONNECTION": 3, + "MOBILE_WIFI_CONNECTION": 4, + "MOBILE_BATTERY_LOW": 5, + "MOBILE_BATTERY_RESTORED": 6, + "BROWSER_INACTIVE_FROM_TIMEOUT": 7, + "BROWSER_INACTIVE_FROM_INACTIVITY": 8, + "RCS_CONNECTION": 9, + "OBSERVER_REGISTERED": 10, + "MOBILE_DATABASE_SYNCING": 11, + "MOBILE_DATABASE_SYNC_COMPLETE": 12, + "MOBILE_DATABASE_SYNC_STARTED": 13, + "MOBILE_DATABASE_PARTIAL_SYNC_COMPLETED": 14, + "MOBILE_DATABASE_PARTIAL_SYNC_STARTED": 15, + "CONTACTS_REFRESH_STARTED": 16, + "CONTACTS_REFRESH_COMPLETED": 17, + } +) + +func (x AlertType) Enum() *AlertType { + p := new(AlertType) + *p = x + return p +} + +func (x AlertType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AlertType) Descriptor() protoreflect.EnumDescriptor { + return file_events_proto_enumTypes[0].Descriptor() +} + +func (AlertType) Type() protoreflect.EnumType { + return &file_events_proto_enumTypes[0] +} + +func (x AlertType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AlertType.Descriptor instead. +func (AlertType) EnumDescriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{0} +} + +type GRPCStatus int32 + +const ( + GRPCStatus_OK GRPCStatus = 0 + GRPCStatus_CANCELLED GRPCStatus = 1 + GRPCStatus_UNKNOWN GRPCStatus = 2 + GRPCStatus_INVALID_ARGUMENT GRPCStatus = 3 + GRPCStatus_DEADLINE_EXCEEDED GRPCStatus = 4 + GRPCStatus_NOT_FOUND GRPCStatus = 5 + GRPCStatus_ALREADY_EXISTS GRPCStatus = 6 + GRPCStatus_PERMISSION_DENIED GRPCStatus = 7 + GRPCStatus_RESOURCE_EXHAUSTED GRPCStatus = 8 + GRPCStatus_FAILED_PRECONDITION GRPCStatus = 9 + GRPCStatus_ABORTED GRPCStatus = 10 + GRPCStatus_OUT_OF_RANGE GRPCStatus = 11 + GRPCStatus_UNIMPLEMENTED GRPCStatus = 12 + GRPCStatus_INTERNAL GRPCStatus = 13 + GRPCStatus_UNAVAILABLE GRPCStatus = 14 + GRPCStatus_DATA_LOSS GRPCStatus = 15 + GRPCStatus_UNAUTHENTICATED GRPCStatus = 16 +) + +// Enum value maps for GRPCStatus. +var ( + GRPCStatus_name = map[int32]string{ + 0: "OK", + 1: "CANCELLED", + 2: "UNKNOWN", + 3: "INVALID_ARGUMENT", + 4: "DEADLINE_EXCEEDED", + 5: "NOT_FOUND", + 6: "ALREADY_EXISTS", + 7: "PERMISSION_DENIED", + 8: "RESOURCE_EXHAUSTED", + 9: "FAILED_PRECONDITION", + 10: "ABORTED", + 11: "OUT_OF_RANGE", + 12: "UNIMPLEMENTED", + 13: "INTERNAL", + 14: "UNAVAILABLE", + 15: "DATA_LOSS", + 16: "UNAUTHENTICATED", + } + GRPCStatus_value = map[string]int32{ + "OK": 0, + "CANCELLED": 1, + "UNKNOWN": 2, + "INVALID_ARGUMENT": 3, + "DEADLINE_EXCEEDED": 4, + "NOT_FOUND": 5, + "ALREADY_EXISTS": 6, + "PERMISSION_DENIED": 7, + "RESOURCE_EXHAUSTED": 8, + "FAILED_PRECONDITION": 9, + "ABORTED": 10, + "OUT_OF_RANGE": 11, + "UNIMPLEMENTED": 12, + "INTERNAL": 13, + "UNAVAILABLE": 14, + "DATA_LOSS": 15, + "UNAUTHENTICATED": 16, + } +) + +func (x GRPCStatus) Enum() *GRPCStatus { + p := new(GRPCStatus) + *p = x + return p +} + +func (x GRPCStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GRPCStatus) Descriptor() protoreflect.EnumDescriptor { + return file_events_proto_enumTypes[1].Descriptor() +} + +func (GRPCStatus) Type() protoreflect.EnumType { + return &file_events_proto_enumTypes[1] +} + +func (x GRPCStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GRPCStatus.Descriptor instead. +func (GRPCStatus) EnumDescriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{1} +} + +type TypingTypes int32 + +const ( + TypingTypes_STOPPED_TYPING TypingTypes = 0 + TypingTypes_STARTED_TYPING TypingTypes = 1 +) + +// Enum value maps for TypingTypes. +var ( + TypingTypes_name = map[int32]string{ + 0: "STOPPED_TYPING", + 1: "STARTED_TYPING", + } + TypingTypes_value = map[string]int32{ + "STOPPED_TYPING": 0, + "STARTED_TYPING": 1, + } +) + +func (x TypingTypes) Enum() *TypingTypes { + p := new(TypingTypes) + *p = x + return p +} + +func (x TypingTypes) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TypingTypes) Descriptor() protoreflect.EnumDescriptor { + return file_events_proto_enumTypes[2].Descriptor() +} + +func (TypingTypes) Type() protoreflect.EnumType { + return &file_events_proto_enumTypes[2] +} + +func (x TypingTypes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TypingTypes.Descriptor instead. +func (TypingTypes) EnumDescriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{2} +} + +type UpdateEvents struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Event: // - // *Event_ConversationEvent - // *Event_MessageEvent - // *Event_UserAlertEvent - Event isEvent_Event `protobuf_oneof:"event"` + // *UpdateEvents_ConversationEvent + // *UpdateEvents_MessageEvent + // *UpdateEvents_TypingEvent + // *UpdateEvents_SettingsEvent + // *UpdateEvents_UserAlertEvent + Event isUpdateEvents_Event `protobuf_oneof:"event"` } -func (x *Event) Reset() { - *x = Event{} +func (x *UpdateEvents) Reset() { + *x = UpdateEvents{} if protoimpl.UnsafeEnabled { mi := &file_events_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -42,13 +275,13 @@ func (x *Event) Reset() { } } -func (x *Event) String() string { +func (x *UpdateEvents) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Event) ProtoMessage() {} +func (*UpdateEvents) ProtoMessage() {} -func (x *Event) ProtoReflect() protoreflect.Message { +func (x *UpdateEvents) ProtoReflect() protoreflect.Message { mi := &file_events_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60,60 +293,86 @@ func (x *Event) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Event.ProtoReflect.Descriptor instead. -func (*Event) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateEvents.ProtoReflect.Descriptor instead. +func (*UpdateEvents) Descriptor() ([]byte, []int) { return file_events_proto_rawDescGZIP(), []int{0} } -func (m *Event) GetEvent() isEvent_Event { +func (m *UpdateEvents) GetEvent() isUpdateEvents_Event { if m != nil { return m.Event } return nil } -func (x *Event) GetConversationEvent() *ConversationEvent { - if x, ok := x.GetEvent().(*Event_ConversationEvent); ok { +func (x *UpdateEvents) GetConversationEvent() *ConversationEvent { + if x, ok := x.GetEvent().(*UpdateEvents_ConversationEvent); ok { return x.ConversationEvent } return nil } -func (x *Event) GetMessageEvent() *MessageEvent { - if x, ok := x.GetEvent().(*Event_MessageEvent); ok { +func (x *UpdateEvents) GetMessageEvent() *MessageEvent { + if x, ok := x.GetEvent().(*UpdateEvents_MessageEvent); ok { return x.MessageEvent } return nil } -func (x *Event) GetUserAlertEvent() *UserAlertEvent { - if x, ok := x.GetEvent().(*Event_UserAlertEvent); ok { +func (x *UpdateEvents) GetTypingEvent() *TypingEvent { + if x, ok := x.GetEvent().(*UpdateEvents_TypingEvent); ok { + return x.TypingEvent + } + return nil +} + +func (x *UpdateEvents) GetSettingsEvent() *Settings { + if x, ok := x.GetEvent().(*UpdateEvents_SettingsEvent); ok { + return x.SettingsEvent + } + return nil +} + +func (x *UpdateEvents) GetUserAlertEvent() *UserAlertEvent { + if x, ok := x.GetEvent().(*UpdateEvents_UserAlertEvent); ok { return x.UserAlertEvent } return nil } -type isEvent_Event interface { - isEvent_Event() +type isUpdateEvents_Event interface { + isUpdateEvents_Event() } -type Event_ConversationEvent struct { +type UpdateEvents_ConversationEvent struct { ConversationEvent *ConversationEvent `protobuf:"bytes,2,opt,name=conversationEvent,proto3,oneof"` } -type Event_MessageEvent struct { +type UpdateEvents_MessageEvent struct { MessageEvent *MessageEvent `protobuf:"bytes,3,opt,name=messageEvent,proto3,oneof"` } -type Event_UserAlertEvent struct { +type UpdateEvents_TypingEvent struct { + TypingEvent *TypingEvent `protobuf:"bytes,4,opt,name=typingEvent,proto3,oneof"` +} + +type UpdateEvents_SettingsEvent struct { + SettingsEvent *Settings `protobuf:"bytes,5,opt,name=settingsEvent,proto3,oneof"` +} + +type UpdateEvents_UserAlertEvent struct { UserAlertEvent *UserAlertEvent `protobuf:"bytes,6,opt,name=userAlertEvent,proto3,oneof"` } -func (*Event_ConversationEvent) isEvent_Event() {} +func (*UpdateEvents_ConversationEvent) isUpdateEvents_Event() {} -func (*Event_MessageEvent) isEvent_Event() {} +func (*UpdateEvents_MessageEvent) isUpdateEvents_Event() {} -func (*Event_UserAlertEvent) isEvent_Event() {} +func (*UpdateEvents_TypingEvent) isUpdateEvents_Event() {} + +func (*UpdateEvents_SettingsEvent) isUpdateEvents_Event() {} + +func (*UpdateEvents_UserAlertEvent) isUpdateEvents_Event() {} type ConversationEvent struct { state protoimpl.MessageState @@ -162,6 +421,53 @@ func (x *ConversationEvent) GetData() *Conversation { return nil } +type TypingEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *TypingData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *TypingEvent) Reset() { + *x = TypingEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_events_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TypingEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TypingEvent) ProtoMessage() {} + +func (x *TypingEvent) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TypingEvent.ProtoReflect.Descriptor instead. +func (*TypingEvent) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{2} +} + +func (x *TypingEvent) GetData() *TypingData { + if x != nil { + return x.Data + } + return nil +} + type MessageEvent struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -173,7 +479,7 @@ type MessageEvent struct { func (x *MessageEvent) Reset() { *x = MessageEvent{} if protoimpl.UnsafeEnabled { - mi := &file_events_proto_msgTypes[2] + mi := &file_events_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -186,7 +492,7 @@ func (x *MessageEvent) String() string { func (*MessageEvent) ProtoMessage() {} func (x *MessageEvent) ProtoReflect() protoreflect.Message { - mi := &file_events_proto_msgTypes[2] + mi := &file_events_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -199,7 +505,7 @@ func (x *MessageEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageEvent.ProtoReflect.Descriptor instead. func (*MessageEvent) Descriptor() ([]byte, []int) { - return file_events_proto_rawDescGZIP(), []int{2} + return file_events_proto_rawDescGZIP(), []int{3} } func (x *MessageEvent) GetData() *Message { @@ -214,26 +520,13 @@ type UserAlertEvent struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // 2 = BROWSER_ACTIVE (new session created in other browser) - // - // 1 = ? - // - // 8 = INACTIVE_LACK_OF_ACTIVITY - // - // 7 = INACTIVE_TIMEOUT - // - // 5|6 = BATTERY (tf?) - // - // 3|4 = DATA_CONNECTION (tf?) - // - // 10 = OBSERVER_REGISTERED (tf?) - AlertType int64 `protobuf:"varint,2,opt,name=alertType,proto3" json:"alertType,omitempty"` + AlertType AlertType `protobuf:"varint,2,opt,name=alertType,proto3,enum=events.AlertType" json:"alertType,omitempty"` } func (x *UserAlertEvent) Reset() { *x = UserAlertEvent{} if protoimpl.UnsafeEnabled { - mi := &file_events_proto_msgTypes[3] + mi := &file_events_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -246,7 +539,7 @@ func (x *UserAlertEvent) String() string { func (*UserAlertEvent) ProtoMessage() {} func (x *UserAlertEvent) ProtoReflect() protoreflect.Message { - mi := &file_events_proto_msgTypes[3] + mi := &file_events_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -259,49 +552,340 @@ func (x *UserAlertEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use UserAlertEvent.ProtoReflect.Descriptor instead. func (*UserAlertEvent) Descriptor() ([]byte, []int) { - return file_events_proto_rawDescGZIP(), []int{3} + return file_events_proto_rawDescGZIP(), []int{4} } -func (x *UserAlertEvent) GetAlertType() int64 { +func (x *UserAlertEvent) GetAlertType() AlertType { if x != nil { return x.AlertType } + return AlertType_ALERT_TYPE_UNKNOWN +} + +type TypingData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID,omitempty"` + User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + Type TypingTypes `protobuf:"varint,3,opt,name=type,proto3,enum=events.TypingTypes" json:"type,omitempty"` +} + +func (x *TypingData) Reset() { + *x = TypingData{} + if protoimpl.UnsafeEnabled { + mi := &file_events_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TypingData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TypingData) ProtoMessage() {} + +func (x *TypingData) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TypingData.ProtoReflect.Descriptor instead. +func (*TypingData) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{5} +} + +func (x *TypingData) GetConversationID() string { + if x != nil { + return x.ConversationID + } + return "" +} + +func (x *TypingData) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +func (x *TypingData) GetType() TypingTypes { + if x != nil { + return x.Type + } + return TypingTypes_STOPPED_TYPING +} + +type User struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Field1 int64 `protobuf:"varint,1,opt,name=field1,proto3" json:"field1,omitempty"` + Number string `protobuf:"bytes,2,opt,name=number,proto3" json:"number,omitempty"` +} + +func (x *User) Reset() { + *x = User{} + if protoimpl.UnsafeEnabled { + mi := &file_events_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *User) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*User) ProtoMessage() {} + +func (x *User) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use User.ProtoReflect.Descriptor instead. +func (*User) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{6} +} + +func (x *User) GetField1() int64 { + if x != nil { + return x.Field1 + } return 0 } +func (x *User) GetNumber() string { + if x != nil { + return x.Number + } + return "" +} + +type PairEvents struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Event: + // + // *PairEvents_Paired + // *PairEvents_Revoked + Event isPairEvents_Event `protobuf_oneof:"event"` +} + +func (x *PairEvents) Reset() { + *x = PairEvents{} + if protoimpl.UnsafeEnabled { + mi := &file_events_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PairEvents) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PairEvents) ProtoMessage() {} + +func (x *PairEvents) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PairEvents.ProtoReflect.Descriptor instead. +func (*PairEvents) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{7} +} + +func (m *PairEvents) GetEvent() isPairEvents_Event { + if m != nil { + return m.Event + } + return nil +} + +func (x *PairEvents) GetPaired() *PairedData { + if x, ok := x.GetEvent().(*PairEvents_Paired); ok { + return x.Paired + } + return nil +} + +func (x *PairEvents) GetRevoked() *RevokePairData { + if x, ok := x.GetEvent().(*PairEvents_Revoked); ok { + return x.Revoked + } + return nil +} + +type isPairEvents_Event interface { + isPairEvents_Event() +} + +type PairEvents_Paired struct { + Paired *PairedData `protobuf:"bytes,4,opt,name=paired,proto3,oneof"` +} + +type PairEvents_Revoked struct { + Revoked *RevokePairData `protobuf:"bytes,5,opt,name=revoked,proto3,oneof"` +} + +func (*PairEvents_Paired) isPairEvents_Event() {} + +func (*PairEvents_Revoked) isPairEvents_Event() {} + var File_events_proto protoreflect.FileDescriptor var file_events_proto_rawDesc = []byte{ 0x0a, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x01, 0x0a, 0x05, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x11, 0x63, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x12, 0x3a, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0e, - 0x75, 0x73, 0x65, 0x72, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, - 0x75, 0x73, 0x65, 0x72, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x07, - 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x44, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, - 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x0e, 0x55, 0x73, 0x65, - 0x72, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, - 0x6c, 0x65, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x61, 0x6c, 0x65, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, - 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xd5, 0x02, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x49, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, + 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x0b, 0x74, 0x79, 0x70, + 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x54, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x48, 0x00, 0x52, + 0x0d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x40, + 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x44, 0x0a, 0x11, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2f, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, + 0x35, 0x0a, 0x0b, 0x54, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x26, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x54, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x22, 0x41, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x09, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x61, 0x6c, 0x65, 0x72, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x7f, 0x0a, 0x0a, 0x54, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x27, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x54, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x36, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x16, + 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x87, + 0x01, 0x0a, 0x0a, 0x50, 0x61, 0x69, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x34, 0x0a, + 0x06, 0x70, 0x61, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, + 0x61, 0x69, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x69, + 0x72, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x50, 0x61, 0x69, 0x72, + 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x42, + 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2a, 0xa6, 0x04, 0x0a, 0x09, 0x41, 0x6c, 0x65, + 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x4c, 0x45, 0x52, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, + 0x0a, 0x10, 0x42, 0x52, 0x4f, 0x57, 0x53, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, + 0x56, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x42, 0x52, 0x4f, 0x57, 0x53, 0x45, 0x52, 0x5f, + 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x4f, 0x42, 0x49, + 0x4c, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x4f, 0x42, 0x49, 0x4c, 0x45, 0x5f, 0x57, + 0x49, 0x46, 0x49, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, + 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x4f, 0x42, 0x49, 0x4c, 0x45, 0x5f, 0x42, 0x41, 0x54, 0x54, 0x45, + 0x52, 0x59, 0x5f, 0x4c, 0x4f, 0x57, 0x10, 0x05, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x4f, 0x42, 0x49, + 0x4c, 0x45, 0x5f, 0x42, 0x41, 0x54, 0x54, 0x45, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x54, 0x4f, + 0x52, 0x45, 0x44, 0x10, 0x06, 0x12, 0x21, 0x0a, 0x1d, 0x42, 0x52, 0x4f, 0x57, 0x53, 0x45, 0x52, + 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x07, 0x12, 0x24, 0x0a, 0x20, 0x42, 0x52, 0x4f, 0x57, + 0x53, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x46, 0x52, 0x4f, + 0x4d, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x10, 0x08, 0x12, 0x12, + 0x0a, 0x0e, 0x52, 0x43, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x52, + 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x1b, 0x0a, 0x17, 0x4d, + 0x4f, 0x42, 0x49, 0x4c, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, + 0x59, 0x4e, 0x43, 0x49, 0x4e, 0x47, 0x10, 0x0b, 0x12, 0x21, 0x0a, 0x1d, 0x4d, 0x4f, 0x42, 0x49, + 0x4c, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, + 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x4d, + 0x4f, 0x42, 0x49, 0x4c, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, + 0x59, 0x4e, 0x43, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x0d, 0x12, 0x2a, 0x0a, + 0x26, 0x4d, 0x4f, 0x42, 0x49, 0x4c, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, + 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x43, 0x4f, + 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x0e, 0x12, 0x28, 0x0a, 0x24, 0x4d, 0x4f, 0x42, + 0x49, 0x4c, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x41, 0x52, + 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, + 0x44, 0x10, 0x0f, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x53, 0x5f, + 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, + 0x10, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x53, 0x5f, 0x52, 0x45, + 0x46, 0x52, 0x45, 0x53, 0x48, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, + 0x11, 0x2a, 0xbd, 0x02, 0x0a, 0x0a, 0x47, 0x52, 0x50, 0x43, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, + 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, + 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, + 0x41, 0x44, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, + 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x05, + 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x53, + 0x54, 0x53, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, + 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x52, + 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x58, 0x48, 0x41, 0x55, 0x53, 0x54, 0x45, + 0x44, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x50, 0x52, + 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, + 0x41, 0x42, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x55, 0x54, + 0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x55, + 0x4e, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x0c, 0x12, 0x0c, + 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x0d, 0x12, 0x0f, 0x0a, 0x0b, + 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x0e, 0x12, 0x0d, 0x0a, + 0x09, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, + 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, + 0x10, 0x2a, 0x35, 0x0a, 0x0b, 0x54, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x49, + 0x4e, 0x47, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x5f, + 0x54, 0x59, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, + 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -316,26 +900,45 @@ func file_events_proto_rawDescGZIP() []byte { return file_events_proto_rawDescData } -var file_events_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_events_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_events_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_events_proto_goTypes = []interface{}{ - (*Event)(nil), // 0: events.Event - (*ConversationEvent)(nil), // 1: events.ConversationEvent - (*MessageEvent)(nil), // 2: events.MessageEvent - (*UserAlertEvent)(nil), // 3: events.UserAlertEvent - (*Conversation)(nil), // 4: conversations.Conversation - (*Message)(nil), // 5: conversations.Message + (AlertType)(0), // 0: events.AlertType + (GRPCStatus)(0), // 1: events.GRPCStatus + (TypingTypes)(0), // 2: events.TypingTypes + (*UpdateEvents)(nil), // 3: events.UpdateEvents + (*ConversationEvent)(nil), // 4: events.ConversationEvent + (*TypingEvent)(nil), // 5: events.TypingEvent + (*MessageEvent)(nil), // 6: events.MessageEvent + (*UserAlertEvent)(nil), // 7: events.UserAlertEvent + (*TypingData)(nil), // 8: events.TypingData + (*User)(nil), // 9: events.User + (*PairEvents)(nil), // 10: events.PairEvents + (*Settings)(nil), // 11: settings.Settings + (*Conversation)(nil), // 12: conversations.Conversation + (*Message)(nil), // 13: conversations.Message + (*PairedData)(nil), // 14: authentication.PairedData + (*RevokePairData)(nil), // 15: authentication.RevokePairData } var file_events_proto_depIdxs = []int32{ - 1, // 0: events.Event.conversationEvent:type_name -> events.ConversationEvent - 2, // 1: events.Event.messageEvent:type_name -> events.MessageEvent - 3, // 2: events.Event.userAlertEvent:type_name -> events.UserAlertEvent - 4, // 3: events.ConversationEvent.data:type_name -> conversations.Conversation - 5, // 4: events.MessageEvent.data:type_name -> conversations.Message - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 4, // 0: events.UpdateEvents.conversationEvent:type_name -> events.ConversationEvent + 6, // 1: events.UpdateEvents.messageEvent:type_name -> events.MessageEvent + 5, // 2: events.UpdateEvents.typingEvent:type_name -> events.TypingEvent + 11, // 3: events.UpdateEvents.settingsEvent:type_name -> settings.Settings + 7, // 4: events.UpdateEvents.userAlertEvent:type_name -> events.UserAlertEvent + 12, // 5: events.ConversationEvent.data:type_name -> conversations.Conversation + 8, // 6: events.TypingEvent.data:type_name -> events.TypingData + 13, // 7: events.MessageEvent.data:type_name -> conversations.Message + 0, // 8: events.UserAlertEvent.alertType:type_name -> events.AlertType + 9, // 9: events.TypingData.user:type_name -> events.User + 2, // 10: events.TypingData.type:type_name -> events.TypingTypes + 14, // 11: events.PairEvents.paired:type_name -> authentication.PairedData + 15, // 12: events.PairEvents.revoked:type_name -> authentication.RevokePairData + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_events_proto_init() } @@ -344,9 +947,11 @@ func file_events_proto_init() { return } file_conversations_proto_init() + file_authentication_proto_init() + file_settings_proto_init() if !protoimpl.UnsafeEnabled { file_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Event); i { + switch v := v.(*UpdateEvents); i { case 0: return &v.state case 1: @@ -370,7 +975,7 @@ func file_events_proto_init() { } } file_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageEvent); i { + switch v := v.(*TypingEvent); i { case 0: return &v.state case 1: @@ -382,6 +987,18 @@ func file_events_proto_init() { } } file_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessageEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_events_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserAlertEvent); i { case 0: return &v.state @@ -393,24 +1010,67 @@ func file_events_proto_init() { return nil } } + file_events_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypingData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_events_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*User); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_events_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PairEvents); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_events_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Event_ConversationEvent)(nil), - (*Event_MessageEvent)(nil), - (*Event_UserAlertEvent)(nil), + (*UpdateEvents_ConversationEvent)(nil), + (*UpdateEvents_MessageEvent)(nil), + (*UpdateEvents_TypingEvent)(nil), + (*UpdateEvents_SettingsEvent)(nil), + (*UpdateEvents_UserAlertEvent)(nil), + } + file_events_proto_msgTypes[7].OneofWrappers = []interface{}{ + (*PairEvents_Paired)(nil), + (*PairEvents_Revoked)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_events_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, + NumEnums: 3, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, GoTypes: file_events_proto_goTypes, DependencyIndexes: file_events_proto_depIdxs, + EnumInfos: file_events_proto_enumTypes, MessageInfos: file_events_proto_msgTypes, }.Build() File_events_proto = out.File diff --git a/libgm/binary/messages.pb.go b/libgm/binary/messages.pb.go index 8b3e732..abfdf2f 100644 --- a/libgm/binary/messages.pb.go +++ b/libgm/binary/messages.pb.go @@ -20,19 +20,195 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type EncodedPayload struct { +type BugleRoute int32 + +const ( + BugleRoute_UNKNOWN_BUGLE_ROUTE BugleRoute = 0 + BugleRoute_DataEvent BugleRoute = 19 + BugleRoute_PairEvent BugleRoute = 14 +) + +// Enum value maps for BugleRoute. +var ( + BugleRoute_name = map[int32]string{ + 0: "UNKNOWN_BUGLE_ROUTE", + 19: "DataEvent", + 14: "PairEvent", + } + BugleRoute_value = map[string]int32{ + "UNKNOWN_BUGLE_ROUTE": 0, + "DataEvent": 19, + "PairEvent": 14, + } +) + +func (x BugleRoute) Enum() *BugleRoute { + p := new(BugleRoute) + *p = x + return p +} + +func (x BugleRoute) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BugleRoute) Descriptor() protoreflect.EnumDescriptor { + return file_messages_proto_enumTypes[0].Descriptor() +} + +func (BugleRoute) Type() protoreflect.EnumType { + return &file_messages_proto_enumTypes[0] +} + +func (x BugleRoute) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BugleRoute.Descriptor instead. +func (BugleRoute) EnumDescriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{0} +} + +type ActionType int32 + +const ( + ActionType_UNKNOWN_ACTION_TYPE ActionType = 0 + ActionType_LIST_CONVERSATIONS ActionType = 1 + ActionType_LIST_MESSAGES ActionType = 2 + ActionType_SEND_MESSAGE ActionType = 3 + ActionType_LIST_CONVERSATIONS_SYNC ActionType = 1111 + ActionType_GET_UPDATES ActionType = 16 + ActionType_GET_CONVERSATION_TYPE ActionType = 21 + ActionType_NOTIFY_DITTO_ACTIVITY ActionType = 22 + ActionType_DELETE_MESSAGE ActionType = 23 + ActionType_RESEND_MESSAGE ActionType = 25 + ActionType_IS_BUGLE_DEFAULT ActionType = 31 + ActionType_SEND_REACTION ActionType = 38 +) + +// Enum value maps for ActionType. +var ( + ActionType_name = map[int32]string{ + 0: "UNKNOWN_ACTION_TYPE", + 1: "LIST_CONVERSATIONS", + 2: "LIST_MESSAGES", + 3: "SEND_MESSAGE", + 1111: "LIST_CONVERSATIONS_SYNC", + 16: "GET_UPDATES", + 21: "GET_CONVERSATION_TYPE", + 22: "NOTIFY_DITTO_ACTIVITY", + 23: "DELETE_MESSAGE", + 25: "RESEND_MESSAGE", + 31: "IS_BUGLE_DEFAULT", + 38: "SEND_REACTION", + } + ActionType_value = map[string]int32{ + "UNKNOWN_ACTION_TYPE": 0, + "LIST_CONVERSATIONS": 1, + "LIST_MESSAGES": 2, + "SEND_MESSAGE": 3, + "LIST_CONVERSATIONS_SYNC": 1111, + "GET_UPDATES": 16, + "GET_CONVERSATION_TYPE": 21, + "NOTIFY_DITTO_ACTIVITY": 22, + "DELETE_MESSAGE": 23, + "RESEND_MESSAGE": 25, + "IS_BUGLE_DEFAULT": 31, + "SEND_REACTION": 38, + } +) + +func (x ActionType) Enum() *ActionType { + p := new(ActionType) + *p = x + return p +} + +func (x ActionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ActionType) Descriptor() protoreflect.EnumDescriptor { + return file_messages_proto_enumTypes[1].Descriptor() +} + +func (ActionType) Type() protoreflect.EnumType { + return &file_messages_proto_enumTypes[1] +} + +func (x ActionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ActionType.Descriptor instead. +func (ActionType) EnumDescriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{1} +} + +type MessageType int32 + +const ( + MessageType_UNKNOWN_MESSAGE_TYPE MessageType = 0 + MessageType_BUGLE_MESSAGE MessageType = 2 + MessageType_BUGLE_ANNOTATION MessageType = 16 +) + +// Enum value maps for MessageType. +var ( + MessageType_name = map[int32]string{ + 0: "UNKNOWN_MESSAGE_TYPE", + 2: "BUGLE_MESSAGE", + 16: "BUGLE_ANNOTATION", + } + MessageType_value = map[string]int32{ + "UNKNOWN_MESSAGE_TYPE": 0, + "BUGLE_MESSAGE": 2, + "BUGLE_ANNOTATION": 16, + } +) + +func (x MessageType) Enum() *MessageType { + p := new(MessageType) + *p = x + return p +} + +func (x MessageType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MessageType) Descriptor() protoreflect.EnumDescriptor { + return file_messages_proto_enumTypes[2].Descriptor() +} + +func (MessageType) Type() protoreflect.EnumType { + return &file_messages_proto_enumTypes[2] +} + +func (x MessageType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MessageType.Descriptor instead. +func (MessageType) EnumDescriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{2} +} + +type RegisterRefreshPayload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` - Opcode int64 `protobuf:"varint,2,opt,name=opcode,proto3" json:"opcode,omitempty"` - EncryptedData []byte `protobuf:"bytes,5,opt,name=encryptedData,proto3" json:"encryptedData,omitempty"` - SessionID string `protobuf:"bytes,6,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + MessageAuth *AuthMessage `protobuf:"bytes,1,opt,name=messageAuth,proto3" json:"messageAuth,omitempty"` + CurrBrowserDevice *Device `protobuf:"bytes,2,opt,name=currBrowserDevice,proto3" json:"currBrowserDevice,omitempty"` + UnixTimestamp int64 `protobuf:"varint,3,opt,name=unixTimestamp,proto3" json:"unixTimestamp,omitempty"` + Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` + EmptyRefreshArr *EmptyRefreshArr `protobuf:"bytes,13,opt,name=emptyRefreshArr,proto3" json:"emptyRefreshArr,omitempty"` + MessageType int32 `protobuf:"varint,16,opt,name=messageType,proto3" json:"messageType,omitempty"` } -func (x *EncodedPayload) Reset() { - *x = EncodedPayload{} +func (x *RegisterRefreshPayload) Reset() { + *x = RegisterRefreshPayload{} if protoimpl.UnsafeEnabled { mi := &file_messages_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -40,13 +216,13 @@ func (x *EncodedPayload) Reset() { } } -func (x *EncodedPayload) String() string { +func (x *RegisterRefreshPayload) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EncodedPayload) ProtoMessage() {} +func (*RegisterRefreshPayload) ProtoMessage() {} -func (x *EncodedPayload) ProtoReflect() protoreflect.Message { +func (x *RegisterRefreshPayload) ProtoReflect() protoreflect.Message { mi := &file_messages_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58,57 +234,63 @@ func (x *EncodedPayload) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EncodedPayload.ProtoReflect.Descriptor instead. -func (*EncodedPayload) Descriptor() ([]byte, []int) { +// Deprecated: Use RegisterRefreshPayload.ProtoReflect.Descriptor instead. +func (*RegisterRefreshPayload) Descriptor() ([]byte, []int) { return file_messages_proto_rawDescGZIP(), []int{0} } -func (x *EncodedPayload) GetRequestID() string { +func (x *RegisterRefreshPayload) GetMessageAuth() *AuthMessage { if x != nil { - return x.RequestID - } - return "" -} - -func (x *EncodedPayload) GetOpcode() int64 { - if x != nil { - return x.Opcode - } - return 0 -} - -func (x *EncodedPayload) GetEncryptedData() []byte { - if x != nil { - return x.EncryptedData + return x.MessageAuth } return nil } -func (x *EncodedPayload) GetSessionID() string { +func (x *RegisterRefreshPayload) GetCurrBrowserDevice() *Device { if x != nil { - return x.SessionID + return x.CurrBrowserDevice + } + return nil +} + +func (x *RegisterRefreshPayload) GetUnixTimestamp() int64 { + if x != nil { + return x.UnixTimestamp + } + return 0 +} + +func (x *RegisterRefreshPayload) GetSignature() string { + if x != nil { + return x.Signature } return "" } -type EncodedResponse struct { +func (x *RegisterRefreshPayload) GetEmptyRefreshArr() *EmptyRefreshArr { + if x != nil { + return x.EmptyRefreshArr + } + return nil +} + +func (x *RegisterRefreshPayload) GetMessageType() int32 { + if x != nil { + return x.MessageType + } + return 0 +} + +type EmptyRefreshArr struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` - // int64 msg = 2; - UnixNano int64 `protobuf:"varint,3,opt,name=unixNano,proto3" json:"unixNano,omitempty"` - Opcode int64 `protobuf:"varint,4,opt,name=opcode,proto3" json:"opcode,omitempty"` - // bytes keyData = 5; - Sub bool `protobuf:"varint,6,opt,name=sub,proto3" json:"sub,omitempty"` - Third int64 `protobuf:"varint,7,opt,name=third,proto3" json:"third,omitempty"` - EncryptedData []byte `protobuf:"bytes,8,opt,name=encryptedData,proto3" json:"encryptedData,omitempty"` - Field9 bool `protobuf:"varint,9,opt,name=field9,proto3" json:"field9,omitempty"` + EmptyArr *EmptyEmptyArr `protobuf:"bytes,9,opt,name=emptyArr,proto3" json:"emptyArr,omitempty"` } -func (x *EncodedResponse) Reset() { - *x = EncodedResponse{} +func (x *EmptyRefreshArr) Reset() { + *x = EmptyRefreshArr{} if protoimpl.UnsafeEnabled { mi := &file_messages_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -116,13 +298,13 @@ func (x *EncodedResponse) Reset() { } } -func (x *EncodedResponse) String() string { +func (x *EmptyRefreshArr) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EncodedResponse) ProtoMessage() {} +func (*EmptyRefreshArr) ProtoMessage() {} -func (x *EncodedResponse) ProtoReflect() protoreflect.Message { +func (x *EmptyRefreshArr) ProtoReflect() protoreflect.Message { mi := &file_messages_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -134,80 +316,26 @@ func (x *EncodedResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EncodedResponse.ProtoReflect.Descriptor instead. -func (*EncodedResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use EmptyRefreshArr.ProtoReflect.Descriptor instead. +func (*EmptyRefreshArr) Descriptor() ([]byte, []int) { return file_messages_proto_rawDescGZIP(), []int{1} } -func (x *EncodedResponse) GetRequestID() string { +func (x *EmptyRefreshArr) GetEmptyArr() *EmptyEmptyArr { if x != nil { - return x.RequestID - } - return "" -} - -func (x *EncodedResponse) GetUnixNano() int64 { - if x != nil { - return x.UnixNano - } - return 0 -} - -func (x *EncodedResponse) GetOpcode() int64 { - if x != nil { - return x.Opcode - } - return 0 -} - -func (x *EncodedResponse) GetSub() bool { - if x != nil { - return x.Sub - } - return false -} - -func (x *EncodedResponse) GetThird() int64 { - if x != nil { - return x.Third - } - return 0 -} - -func (x *EncodedResponse) GetEncryptedData() []byte { - if x != nil { - return x.EncryptedData + return x.EmptyArr } return nil } -func (x *EncodedResponse) GetField9() bool { - if x != nil { - return x.Field9 - } - return false -} - -type MessageData struct { +type EmptyEmptyArr struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` - RoutingOpCode int64 `protobuf:"varint,2,opt,name=routingOpCode,proto3" json:"routingOpCode,omitempty"` - Ts1 string `protobuf:"bytes,3,opt,name=ts1,proto3" json:"ts1,omitempty"` - Field5 int64 `protobuf:"varint,5,opt,name=field5,proto3" json:"field5,omitempty"` - Ts2 string `protobuf:"bytes,6,opt,name=ts2,proto3" json:"ts2,omitempty"` - SomeString string `protobuf:"bytes,7,opt,name=someString,proto3" json:"someString,omitempty"` - Mobile *Device `protobuf:"bytes,8,opt,name=mobile,proto3" json:"mobile,omitempty"` - Browser *Device `protobuf:"bytes,9,opt,name=browser,proto3" json:"browser,omitempty"` - EncodedData string `protobuf:"bytes,12,opt,name=encodedData,proto3" json:"encodedData,omitempty"` - EncodedRequestID string `protobuf:"bytes,17,opt,name=encodedRequestID,proto3" json:"encodedRequestID,omitempty"` - MsgTypeArr *MsgTypeArr `protobuf:"bytes,23,opt,name=msgTypeArr,proto3" json:"msgTypeArr,omitempty"` } -func (x *MessageData) Reset() { - *x = MessageData{} +func (x *EmptyEmptyArr) Reset() { + *x = EmptyEmptyArr{} if protoimpl.UnsafeEnabled { mi := &file_messages_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -215,13 +343,13 @@ func (x *MessageData) Reset() { } } -func (x *MessageData) String() string { +func (x *EmptyEmptyArr) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MessageData) ProtoMessage() {} +func (*EmptyEmptyArr) ProtoMessage() {} -func (x *MessageData) ProtoReflect() protoreflect.Message { +func (x *EmptyEmptyArr) ProtoReflect() protoreflect.Message { mi := &file_messages_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -233,99 +361,22 @@ func (x *MessageData) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MessageData.ProtoReflect.Descriptor instead. -func (*MessageData) Descriptor() ([]byte, []int) { +// Deprecated: Use EmptyEmptyArr.ProtoReflect.Descriptor instead. +func (*EmptyEmptyArr) Descriptor() ([]byte, []int) { return file_messages_proto_rawDescGZIP(), []int{2} } -func (x *MessageData) GetRequestID() string { - if x != nil { - return x.RequestID - } - return "" -} - -func (x *MessageData) GetRoutingOpCode() int64 { - if x != nil { - return x.RoutingOpCode - } - return 0 -} - -func (x *MessageData) GetTs1() string { - if x != nil { - return x.Ts1 - } - return "" -} - -func (x *MessageData) GetField5() int64 { - if x != nil { - return x.Field5 - } - return 0 -} - -func (x *MessageData) GetTs2() string { - if x != nil { - return x.Ts2 - } - return "" -} - -func (x *MessageData) GetSomeString() string { - if x != nil { - return x.SomeString - } - return "" -} - -func (x *MessageData) GetMobile() *Device { - if x != nil { - return x.Mobile - } - return nil -} - -func (x *MessageData) GetBrowser() *Device { - if x != nil { - return x.Browser - } - return nil -} - -func (x *MessageData) GetEncodedData() string { - if x != nil { - return x.EncodedData - } - return "" -} - -func (x *MessageData) GetEncodedRequestID() string { - if x != nil { - return x.EncodedRequestID - } - return "" -} - -func (x *MessageData) GetMsgTypeArr() *MsgTypeArr { - if x != nil { - return x.MsgTypeArr - } - return nil -} - -type MsgTypeArr struct { +type InternalMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - EmptyArr *EmptyArr `protobuf:"bytes,1,opt,name=emptyArr,proto3" json:"emptyArr,omitempty"` - MsgType int64 `protobuf:"varint,2,opt,name=msgType,proto3" json:"msgType,omitempty"` + Unknown1 []byte `protobuf:"bytes,1,opt,name=unknown1,proto3" json:"unknown1,omitempty"` + Data *InternalMessageData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` } -func (x *MsgTypeArr) Reset() { - *x = MsgTypeArr{} +func (x *InternalMessage) Reset() { + *x = InternalMessage{} if protoimpl.UnsafeEnabled { mi := &file_messages_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -333,13 +384,13 @@ func (x *MsgTypeArr) Reset() { } } -func (x *MsgTypeArr) String() string { +func (x *InternalMessage) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgTypeArr) ProtoMessage() {} +func (*InternalMessage) ProtoMessage() {} -func (x *MsgTypeArr) ProtoReflect() protoreflect.Message { +func (x *InternalMessage) ProtoReflect() protoreflect.Message { mi := &file_messages_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -351,23 +402,628 @@ func (x *MsgTypeArr) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MsgTypeArr.ProtoReflect.Descriptor instead. -func (*MsgTypeArr) Descriptor() ([]byte, []int) { +// Deprecated: Use InternalMessage.ProtoReflect.Descriptor instead. +func (*InternalMessage) Descriptor() ([]byte, []int) { return file_messages_proto_rawDescGZIP(), []int{3} } -func (x *MsgTypeArr) GetEmptyArr() *EmptyArr { +func (x *InternalMessage) GetUnknown1() []byte { + if x != nil { + return x.Unknown1 + } + return nil +} + +func (x *InternalMessage) GetData() *InternalMessageData { + if x != nil { + return x.Data + } + return nil +} + +type InternalMessageData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResponseID string `protobuf:"bytes,1,opt,name=responseID,proto3" json:"responseID,omitempty"` + BugleRoute BugleRoute `protobuf:"varint,2,opt,name=bugleRoute,proto3,enum=messages.BugleRoute" json:"bugleRoute,omitempty"` + StartExecute string `protobuf:"bytes,3,opt,name=startExecute,proto3" json:"startExecute,omitempty"` + // bytes unknown4 = 4; + MessageType MessageType `protobuf:"varint,5,opt,name=messageType,proto3,enum=messages.MessageType" json:"messageType,omitempty"` + FinishExecute string `protobuf:"bytes,6,opt,name=finishExecute,proto3" json:"finishExecute,omitempty"` + MillisecondsTaken string `protobuf:"bytes,7,opt,name=millisecondsTaken,proto3" json:"millisecondsTaken,omitempty"` + Mobile *Device `protobuf:"bytes,8,opt,name=mobile,proto3" json:"mobile,omitempty"` + Browser *Device `protobuf:"bytes,9,opt,name=browser,proto3" json:"browser,omitempty"` + // bytes unknown5 = 10; + // bytes unknown6 = 11; + ProtobufData []byte `protobuf:"bytes,12,opt,name=protobufData,proto3" json:"protobufData,omitempty"` + // bytes unknown7 = 13; + // bytes unknown8 = 14; + // bytes unknown9 = 15; + // bytes unknown10 = 16; + SignatureID string `protobuf:"bytes,17,opt,name=signatureID,proto3" json:"signatureID,omitempty"` + // bytes unknown11 = 18; + // bytes unknown12 = 19; + // bytes unknown13 = 20; + Timestamp string `protobuf:"bytes,21,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *InternalMessageData) Reset() { + *x = InternalMessageData{} + if protoimpl.UnsafeEnabled { + mi := &file_messages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InternalMessageData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalMessageData) ProtoMessage() {} + +func (x *InternalMessageData) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalMessageData.ProtoReflect.Descriptor instead. +func (*InternalMessageData) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{4} +} + +func (x *InternalMessageData) GetResponseID() string { + if x != nil { + return x.ResponseID + } + return "" +} + +func (x *InternalMessageData) GetBugleRoute() BugleRoute { + if x != nil { + return x.BugleRoute + } + return BugleRoute_UNKNOWN_BUGLE_ROUTE +} + +func (x *InternalMessageData) GetStartExecute() string { + if x != nil { + return x.StartExecute + } + return "" +} + +func (x *InternalMessageData) GetMessageType() MessageType { + if x != nil { + return x.MessageType + } + return MessageType_UNKNOWN_MESSAGE_TYPE +} + +func (x *InternalMessageData) GetFinishExecute() string { + if x != nil { + return x.FinishExecute + } + return "" +} + +func (x *InternalMessageData) GetMillisecondsTaken() string { + if x != nil { + return x.MillisecondsTaken + } + return "" +} + +func (x *InternalMessageData) GetMobile() *Device { + if x != nil { + return x.Mobile + } + return nil +} + +func (x *InternalMessageData) GetBrowser() *Device { + if x != nil { + return x.Browser + } + return nil +} + +func (x *InternalMessageData) GetProtobufData() []byte { + if x != nil { + return x.ProtobufData + } + return nil +} + +func (x *InternalMessageData) GetSignatureID() string { + if x != nil { + return x.SignatureID + } + return "" +} + +func (x *InternalMessageData) GetTimestamp() string { + if x != nil { + return x.Timestamp + } + return "" +} + +type InternalRequestData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Action ActionType `protobuf:"varint,4,opt,name=action,proto3,enum=messages.ActionType" json:"action,omitempty"` + Bool1 bool `protobuf:"varint,6,opt,name=bool1,proto3" json:"bool1,omitempty"` + Bool2 bool `protobuf:"varint,7,opt,name=bool2,proto3" json:"bool2,omitempty"` + EncryptedData []byte `protobuf:"bytes,8,opt,name=encryptedData,proto3" json:"encryptedData,omitempty"` + Bool3 bool `protobuf:"varint,9,opt,name=bool3,proto3" json:"bool3,omitempty"` +} + +func (x *InternalRequestData) Reset() { + *x = InternalRequestData{} + if protoimpl.UnsafeEnabled { + mi := &file_messages_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InternalRequestData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalRequestData) ProtoMessage() {} + +func (x *InternalRequestData) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalRequestData.ProtoReflect.Descriptor instead. +func (*InternalRequestData) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{5} +} + +func (x *InternalRequestData) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *InternalRequestData) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *InternalRequestData) GetAction() ActionType { + if x != nil { + return x.Action + } + return ActionType_UNKNOWN_ACTION_TYPE +} + +func (x *InternalRequestData) GetBool1() bool { + if x != nil { + return x.Bool1 + } + return false +} + +func (x *InternalRequestData) GetBool2() bool { + if x != nil { + return x.Bool2 + } + return false +} + +func (x *InternalRequestData) GetEncryptedData() []byte { + if x != nil { + return x.EncryptedData + } + return nil +} + +func (x *InternalRequestData) GetBool3() bool { + if x != nil { + return x.Bool3 + } + return false +} + +type SendMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Mobile *Device `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"` + MessageData *SendMessageData `protobuf:"bytes,2,opt,name=messageData,proto3" json:"messageData,omitempty"` + MessageAuth *SendMessageAuth `protobuf:"bytes,3,opt,name=messageAuth,proto3" json:"messageAuth,omitempty"` + // bytes unknown1 = 4; + TTL int64 `protobuf:"varint,5,opt,name=TTL,proto3" json:"TTL,omitempty"` // might be something related to config + // bytes unknown2 = 6; + // bytes unknown3 = 7; + // bytes unknown4 = 8; + EmptyArr *EmptyArr `protobuf:"bytes,9,opt,name=emptyArr,proto3" json:"emptyArr,omitempty"` +} + +func (x *SendMessage) Reset() { + *x = SendMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_messages_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMessage) ProtoMessage() {} + +func (x *SendMessage) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendMessage.ProtoReflect.Descriptor instead. +func (*SendMessage) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{6} +} + +func (x *SendMessage) GetMobile() *Device { + if x != nil { + return x.Mobile + } + return nil +} + +func (x *SendMessage) GetMessageData() *SendMessageData { + if x != nil { + return x.MessageData + } + return nil +} + +func (x *SendMessage) GetMessageAuth() *SendMessageAuth { + if x != nil { + return x.MessageAuth + } + return nil +} + +func (x *SendMessage) GetTTL() int64 { + if x != nil { + return x.TTL + } + return 0 +} + +func (x *SendMessage) GetEmptyArr() *EmptyArr { if x != nil { return x.EmptyArr } return nil } -func (x *MsgTypeArr) GetMsgType() int64 { - if x != nil { - return x.MsgType +type SendMessageAuth struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` + // bytes unknown1 = 2; + // bytes unknown2 = 3; + // bytes unknown3 = 4; + // bytes unknown4 = 5; + TachyonAuthToken []byte `protobuf:"bytes,6,opt,name=tachyonAuthToken,proto3" json:"tachyonAuthToken,omitempty"` + ConfigVersion *ConfigVersion `protobuf:"bytes,7,opt,name=configVersion,proto3" json:"configVersion,omitempty"` +} + +func (x *SendMessageAuth) Reset() { + *x = SendMessageAuth{} + if protoimpl.UnsafeEnabled { + mi := &file_messages_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 +} + +func (x *SendMessageAuth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMessageAuth) ProtoMessage() {} + +func (x *SendMessageAuth) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendMessageAuth.ProtoReflect.Descriptor instead. +func (*SendMessageAuth) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{7} +} + +func (x *SendMessageAuth) GetRequestID() string { + if x != nil { + return x.RequestID + } + return "" +} + +func (x *SendMessageAuth) GetTachyonAuthToken() []byte { + if x != nil { + return x.TachyonAuthToken + } + return nil +} + +func (x *SendMessageAuth) GetConfigVersion() *ConfigVersion { + if x != nil { + return x.ConfigVersion + } + return nil +} + +type SendMessageInternal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` + Action ActionType `protobuf:"varint,2,opt,name=action,proto3,enum=messages.ActionType" json:"action,omitempty"` + EncryptedProtoData []byte `protobuf:"bytes,5,opt,name=encryptedProtoData,proto3" json:"encryptedProtoData,omitempty"` + SessionID string `protobuf:"bytes,6,opt,name=sessionID,proto3" json:"sessionID,omitempty"` +} + +func (x *SendMessageInternal) Reset() { + *x = SendMessageInternal{} + if protoimpl.UnsafeEnabled { + mi := &file_messages_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendMessageInternal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMessageInternal) ProtoMessage() {} + +func (x *SendMessageInternal) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendMessageInternal.ProtoReflect.Descriptor instead. +func (*SendMessageInternal) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{8} +} + +func (x *SendMessageInternal) GetRequestID() string { + if x != nil { + return x.RequestID + } + return "" +} + +func (x *SendMessageInternal) GetAction() ActionType { + if x != nil { + return x.Action + } + return ActionType_UNKNOWN_ACTION_TYPE +} + +func (x *SendMessageInternal) GetEncryptedProtoData() []byte { + if x != nil { + return x.EncryptedProtoData + } + return nil +} + +func (x *SendMessageInternal) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +// requestID = 1 +// +// encodedData = { +// requestID = 1 ^same +// +// sessionID = 6 +// } +type SendMessageData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` + BugleRoute BugleRoute `protobuf:"varint,2,opt,name=bugleRoute,proto3,enum=messages.BugleRoute" json:"bugleRoute,omitempty"` + // bytes unknown1 = 3; + // bytes unknown2 = 4; + // bytes unknown3 = 5; + // bytes unknown4 = 6; + // bytes unknown5 = 7; + // bytes unknown6 = 8; + // bytes unknown7 = 9; + // bytes unknown8 = 10; + // bytes unknown9 = 11; + ProtobufData []byte `protobuf:"bytes,12,opt,name=protobufData,proto3" json:"protobufData,omitempty"` + // bytes unknown10 = 13; + // bytes unknown11 = 14; + // bytes unknown12 = 15; + // bytes unknown13 = 16; + // bytes unknown14 = 17; + // bytes unknown15 = 18; + // bytes unknown16 = 19; + // bytes unknown17 = 20; + // bytes unknown18 = 21; + // bytes unknown19 = 22; + MessageTypeData *MessageTypeData `protobuf:"bytes,23,opt,name=messageTypeData,proto3" json:"messageTypeData,omitempty"` +} + +func (x *SendMessageData) Reset() { + *x = SendMessageData{} + if protoimpl.UnsafeEnabled { + mi := &file_messages_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendMessageData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMessageData) ProtoMessage() {} + +func (x *SendMessageData) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendMessageData.ProtoReflect.Descriptor instead. +func (*SendMessageData) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{9} +} + +func (x *SendMessageData) GetRequestID() string { + if x != nil { + return x.RequestID + } + return "" +} + +func (x *SendMessageData) GetBugleRoute() BugleRoute { + if x != nil { + return x.BugleRoute + } + return BugleRoute_UNKNOWN_BUGLE_ROUTE +} + +func (x *SendMessageData) GetProtobufData() []byte { + if x != nil { + return x.ProtobufData + } + return nil +} + +func (x *SendMessageData) GetMessageTypeData() *MessageTypeData { + if x != nil { + return x.MessageTypeData + } + return nil +} + +type MessageTypeData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EmptyArr *EmptyArr `protobuf:"bytes,1,opt,name=emptyArr,proto3" json:"emptyArr,omitempty"` + MessageType MessageType `protobuf:"varint,2,opt,name=messageType,proto3,enum=messages.MessageType" json:"messageType,omitempty"` +} + +func (x *MessageTypeData) Reset() { + *x = MessageTypeData{} + if protoimpl.UnsafeEnabled { + mi := &file_messages_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessageTypeData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageTypeData) ProtoMessage() {} + +func (x *MessageTypeData) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageTypeData.ProtoReflect.Descriptor instead. +func (*MessageTypeData) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{10} +} + +func (x *MessageTypeData) GetEmptyArr() *EmptyArr { + if x != nil { + return x.EmptyArr + } + return nil +} + +func (x *MessageTypeData) GetMessageType() MessageType { + if x != nil { + return x.MessageType + } + return MessageType_UNKNOWN_MESSAGE_TYPE } type EmptyArr struct { @@ -379,7 +1035,7 @@ type EmptyArr struct { func (x *EmptyArr) Reset() { *x = EmptyArr{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[4] + mi := &file_messages_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -392,7 +1048,7 @@ func (x *EmptyArr) String() string { func (*EmptyArr) ProtoMessage() {} func (x *EmptyArr) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[4] + mi := &file_messages_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -405,7 +1061,7 @@ func (x *EmptyArr) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyArr.ProtoReflect.Descriptor instead. func (*EmptyArr) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{4} + return file_messages_proto_rawDescGZIP(), []int{11} } type AuthMessage struct { @@ -413,15 +1069,15 @@ type AuthMessage struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` - RpcKey []byte `protobuf:"bytes,6,opt,name=rpcKey,proto3" json:"rpcKey,omitempty"` - Date *Date `protobuf:"bytes,7,opt,name=date,proto3" json:"date,omitempty"` + RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` + TachyonAuthToken []byte `protobuf:"bytes,6,opt,name=tachyonAuthToken,proto3" json:"tachyonAuthToken,omitempty"` + ConfigVersion *ConfigVersion `protobuf:"bytes,7,opt,name=configVersion,proto3" json:"configVersion,omitempty"` } func (x *AuthMessage) Reset() { *x = AuthMessage{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[5] + mi := &file_messages_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -434,7 +1090,7 @@ func (x *AuthMessage) String() string { func (*AuthMessage) ProtoMessage() {} func (x *AuthMessage) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[5] + mi := &file_messages_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -447,7 +1103,7 @@ func (x *AuthMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthMessage.ProtoReflect.Descriptor instead. func (*AuthMessage) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{5} + return file_messages_proto_rawDescGZIP(), []int{12} } func (x *AuthMessage) GetRequestID() string { @@ -457,16 +1113,16 @@ func (x *AuthMessage) GetRequestID() string { return "" } -func (x *AuthMessage) GetRpcKey() []byte { +func (x *AuthMessage) GetTachyonAuthToken() []byte { if x != nil { - return x.RpcKey + return x.TachyonAuthToken } return nil } -func (x *AuthMessage) GetDate() *Date { +func (x *AuthMessage) GetConfigVersion() *ConfigVersion { if x != nil { - return x.Date + return x.ConfigVersion } return nil } @@ -483,7 +1139,7 @@ type ReceiveMessagesRequest struct { func (x *ReceiveMessagesRequest) Reset() { *x = ReceiveMessagesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[6] + mi := &file_messages_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -496,7 +1152,7 @@ func (x *ReceiveMessagesRequest) String() string { func (*ReceiveMessagesRequest) ProtoMessage() {} func (x *ReceiveMessagesRequest) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[6] + mi := &file_messages_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -509,7 +1165,7 @@ func (x *ReceiveMessagesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReceiveMessagesRequest.ProtoReflect.Descriptor instead. func (*ReceiveMessagesRequest) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{6} + return file_messages_proto_rawDescGZIP(), []int{13} } func (x *ReceiveMessagesRequest) GetAuth() *AuthMessage { @@ -538,7 +1194,7 @@ type BaseData struct { func (x *BaseData) Reset() { *x = BaseData{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[7] + mi := &file_messages_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -551,7 +1207,7 @@ func (x *BaseData) String() string { func (*BaseData) ProtoMessage() {} func (x *BaseData) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[7] + mi := &file_messages_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -564,7 +1220,7 @@ func (x *BaseData) ProtoReflect() protoreflect.Message { // Deprecated: Use BaseData.ProtoReflect.Descriptor instead. func (*BaseData) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{7} + return file_messages_proto_rawDescGZIP(), []int{14} } func (x *BaseData) GetTTL() int64 { @@ -581,75 +1237,20 @@ func (x *BaseData) GetEmptyArr() *EmptyArr { return nil } -type RPCResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Unknown []byte `protobuf:"bytes,1,opt,name=unknown,proto3" json:"unknown,omitempty"` - Data *MessageData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *RPCResponse) Reset() { - *x = RPCResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RPCResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RPCResponse) ProtoMessage() {} - -func (x *RPCResponse) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RPCResponse.ProtoReflect.Descriptor instead. -func (*RPCResponse) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{8} -} - -func (x *RPCResponse) GetUnknown() []byte { - if x != nil { - return x.Unknown - } - return nil -} - -func (x *RPCResponse) GetData() *MessageData { - if x != nil { - return x.Data - } - return nil -} - type Device struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserID int64 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"` - RegistrationID string `protobuf:"bytes,2,opt,name=registrationID,proto3" json:"registrationID,omitempty"` - Network string `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` + UserID int64 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"` + SourceID string `protobuf:"bytes,2,opt,name=sourceID,proto3" json:"sourceID,omitempty"` + Network string `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` } func (x *Device) Reset() { *x = Device{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[9] + mi := &file_messages_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -662,7 +1263,7 @@ func (x *Device) String() string { func (*Device) ProtoMessage() {} func (x *Device) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[9] + mi := &file_messages_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -675,7 +1276,7 @@ func (x *Device) ProtoReflect() protoreflect.Message { // Deprecated: Use Device.ProtoReflect.Descriptor instead. func (*Device) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{9} + return file_messages_proto_rawDescGZIP(), []int{15} } func (x *Device) GetUserID() int64 { @@ -685,9 +1286,9 @@ func (x *Device) GetUserID() int64 { return 0 } -func (x *Device) GetRegistrationID() string { +func (x *Device) GetSourceID() string { if x != nil { - return x.RegistrationID + return x.SourceID } return "" } @@ -699,35 +1300,35 @@ func (x *Device) GetNetwork() string { return "" } -type Date struct { +type ConfigVersion struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Year int64 `protobuf:"varint,3,opt,name=year,proto3" json:"year,omitempty"` - Seq1 int64 `protobuf:"varint,4,opt,name=seq1,proto3" json:"seq1,omitempty"` - Seq2 int64 `protobuf:"varint,5,opt,name=seq2,proto3" json:"seq2,omitempty"` - Seq3 int64 `protobuf:"varint,7,opt,name=seq3,proto3" json:"seq3,omitempty"` - Seq4 int64 `protobuf:"varint,9,opt,name=seq4,proto3" json:"seq4,omitempty"` + V1 int32 `protobuf:"varint,3,opt,name=V1,proto3" json:"V1,omitempty"` + V2 int32 `protobuf:"varint,4,opt,name=V2,proto3" json:"V2,omitempty"` + V3 int32 `protobuf:"varint,5,opt,name=V3,proto3" json:"V3,omitempty"` + V4 int32 `protobuf:"varint,7,opt,name=V4,proto3" json:"V4,omitempty"` + V5 int32 `protobuf:"varint,9,opt,name=V5,proto3" json:"V5,omitempty"` } -func (x *Date) Reset() { - *x = Date{} +func (x *ConfigVersion) Reset() { + *x = ConfigVersion{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[10] + mi := &file_messages_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Date) String() string { +func (x *ConfigVersion) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Date) ProtoMessage() {} +func (*ConfigVersion) ProtoMessage() {} -func (x *Date) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[10] +func (x *ConfigVersion) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -738,42 +1339,42 @@ func (x *Date) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Date.ProtoReflect.Descriptor instead. -func (*Date) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{10} +// Deprecated: Use ConfigVersion.ProtoReflect.Descriptor instead. +func (*ConfigVersion) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{16} } -func (x *Date) GetYear() int64 { +func (x *ConfigVersion) GetV1() int32 { if x != nil { - return x.Year + return x.V1 } return 0 } -func (x *Date) GetSeq1() int64 { +func (x *ConfigVersion) GetV2() int32 { if x != nil { - return x.Seq1 + return x.V2 } return 0 } -func (x *Date) GetSeq2() int64 { +func (x *ConfigVersion) GetV3() int32 { if x != nil { - return x.Seq2 + return x.V3 } return 0 } -func (x *Date) GetSeq3() int64 { +func (x *ConfigVersion) GetV4() int32 { if x != nil { - return x.Seq3 + return x.V4 } return 0 } -func (x *Date) GetSeq4() int64 { +func (x *ConfigVersion) GetV5() int32 { if x != nil { - return x.Seq4 + return x.V5 } return 0 } @@ -787,7 +1388,7 @@ type ReceiveMessagesRequest_UnknownEmptyObject1 struct { func (x *ReceiveMessagesRequest_UnknownEmptyObject1) Reset() { *x = ReceiveMessagesRequest_UnknownEmptyObject1{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[11] + mi := &file_messages_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -800,7 +1401,7 @@ func (x *ReceiveMessagesRequest_UnknownEmptyObject1) String() string { func (*ReceiveMessagesRequest_UnknownEmptyObject1) ProtoMessage() {} func (x *ReceiveMessagesRequest_UnknownEmptyObject1) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[11] + mi := &file_messages_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -813,7 +1414,7 @@ func (x *ReceiveMessagesRequest_UnknownEmptyObject1) ProtoReflect() protoreflect // Deprecated: Use ReceiveMessagesRequest_UnknownEmptyObject1.ProtoReflect.Descriptor instead. func (*ReceiveMessagesRequest_UnknownEmptyObject1) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{6, 0} + return file_messages_proto_rawDescGZIP(), []int{13, 0} } type ReceiveMessagesRequest_UnknownEmptyObject2 struct { @@ -827,7 +1428,7 @@ type ReceiveMessagesRequest_UnknownEmptyObject2 struct { func (x *ReceiveMessagesRequest_UnknownEmptyObject2) Reset() { *x = ReceiveMessagesRequest_UnknownEmptyObject2{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[12] + mi := &file_messages_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -840,7 +1441,7 @@ func (x *ReceiveMessagesRequest_UnknownEmptyObject2) String() string { func (*ReceiveMessagesRequest_UnknownEmptyObject2) ProtoMessage() {} func (x *ReceiveMessagesRequest_UnknownEmptyObject2) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[12] + mi := &file_messages_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -853,7 +1454,7 @@ func (x *ReceiveMessagesRequest_UnknownEmptyObject2) ProtoReflect() protoreflect // Deprecated: Use ReceiveMessagesRequest_UnknownEmptyObject2.ProtoReflect.Descriptor instead. func (*ReceiveMessagesRequest_UnknownEmptyObject2) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{6, 1} + return file_messages_proto_rawDescGZIP(), []int{13, 1} } func (x *ReceiveMessagesRequest_UnknownEmptyObject2) GetUnknown() *ReceiveMessagesRequest_UnknownEmptyObject1 { @@ -867,109 +1468,214 @@ var File_messages_proto protoreflect.FileDescriptor var file_messages_proto_rawDesc = []byte{ 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x0e, 0x45, - 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, - 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x6f, - 0x70, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x70, 0x63, - 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x44, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xc9, 0x01, 0x0a, 0x0f, 0x45, 0x6e, 0x63, 0x6f, - 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x69, - 0x78, 0x4e, 0x61, 0x6e, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x6e, 0x69, - 0x78, 0x4e, 0x61, 0x6e, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x73, 0x75, 0x62, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x73, 0x75, 0x62, 0x12, - 0x14, 0x0a, 0x05, 0x74, 0x68, 0x69, 0x72, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x74, 0x68, 0x69, 0x72, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x39, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x39, 0x22, 0x87, 0x03, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, - 0x44, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x43, 0x6f, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x67, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x73, 0x31, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x73, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x35, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x73, 0x32, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x74, 0x73, 0x32, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x6d, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x6d, 0x65, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x12, 0x28, 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x08, 0x20, + 0x12, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0xbc, 0x02, 0x0a, 0x16, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x37, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x41, 0x75, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x75, 0x74, 0x68, 0x12, 0x3e, + 0x0a, 0x11, 0x63, 0x75, 0x72, 0x72, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x11, 0x63, 0x75, 0x72, + 0x72, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x24, + 0x0a, 0x0d, 0x75, 0x6e, 0x69, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x75, 0x6e, 0x69, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x12, 0x43, 0x0a, 0x0f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x41, 0x72, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x41, 0x72, 0x72, 0x52, 0x0f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x41, 0x72, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x46, 0x0a, 0x0f, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x41, 0x72, 0x72, 0x12, 0x33, 0x0a, 0x08, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x52, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, + 0x72, 0x22, 0x0f, 0x0a, 0x0d, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, + 0x72, 0x72, 0x22, 0x60, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x31, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0xd6, 0x03, 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x44, 0x12, 0x34, 0x0a, 0x0a, + 0x62, 0x75, 0x67, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x42, 0x75, 0x67, 0x6c, + 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x62, 0x75, 0x67, 0x6c, 0x65, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x24, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x54, 0x61, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x11, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x54, 0x61, + 0x6b, 0x65, 0x6e, 0x12, 0x28, 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x52, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x10, 0x65, - 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x12, 0x34, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x54, 0x79, - 0x70, 0x65, 0x41, 0x72, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x41, 0x72, - 0x72, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x41, 0x72, 0x72, 0x22, 0x56, 0x0a, - 0x0a, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x41, 0x72, 0x72, 0x12, 0x2e, 0x0a, 0x08, 0x65, - 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, - 0x72, 0x52, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, - 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x73, - 0x67, 0x54, 0x79, 0x70, 0x65, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, - 0x72, 0x22, 0x67, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x12, 0x16, - 0x0a, 0x06, 0x72, 0x70, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, - 0x72, 0x70, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x44, 0x61, 0x74, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x16, 0x52, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x41, - 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, - 0x12, 0x53, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x34, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x48, 0x00, 0x52, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, - 0x77, 0x6e, 0x88, 0x01, 0x01, 0x1a, 0x15, 0x0a, 0x13, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x31, 0x1a, 0x65, 0x0a, 0x13, - 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x32, 0x12, 0x4e, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x31, 0x52, 0x07, 0x75, 0x6e, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x22, - 0x4c, 0x0a, 0x08, 0x42, 0x61, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x54, - 0x54, 0x4c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x54, 0x54, 0x4c, 0x12, 0x2e, 0x0a, - 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x52, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x44, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, + 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x49, 0x44, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x49, 0x44, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x15, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xe7, 0x01, + 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x32, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x32, 0x12, 0x24, 0x0a, 0x0d, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x33, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x33, 0x22, 0xf3, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, + 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3b, + 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x75, 0x74, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x53, + 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x75, 0x74, 0x68, 0x52, 0x0b, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x75, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x54, + 0x54, 0x4c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x54, 0x54, 0x4c, 0x12, 0x2e, 0x0a, + 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x41, 0x72, 0x72, 0x52, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x22, 0x52, 0x0a, - 0x0b, 0x52, 0x50, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x75, - 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x22, 0x62, 0x0a, 0x06, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x41, 0x72, 0x72, 0x52, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x22, 0x9a, 0x01, + 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x75, 0x74, + 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x12, + 0x2a, 0x0a, 0x10, 0x74, 0x61, 0x63, 0x68, 0x79, 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x61, 0x63, 0x68, 0x79, + 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x3d, 0x0a, 0x0d, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xaf, 0x01, 0x0a, 0x13, 0x53, + 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, + 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, + 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x44, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xce, 0x01, 0x0a, + 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x12, 0x34, + 0x0a, 0x0a, 0x62, 0x75, 0x67, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x42, 0x75, + 0x67, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x62, 0x75, 0x67, 0x6c, 0x65, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x44, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x44, 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, 0x0f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x44, 0x61, 0x74, 0x61, 0x18, 0x17, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0x7a, 0x0a, + 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x2e, 0x0a, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x52, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, + 0x12, 0x37, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x41, 0x72, 0x72, 0x22, 0x96, 0x01, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x61, 0x63, 0x68, 0x79, 0x6f, 0x6e, 0x41, 0x75, + 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, + 0x61, 0x63, 0x68, 0x79, 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x3d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa2, + 0x02, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x61, 0x75, 0x74, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x04, + 0x61, 0x75, 0x74, 0x68, 0x12, 0x53, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x48, 0x00, 0x52, 0x07, 0x75, + 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x88, 0x01, 0x01, 0x1a, 0x15, 0x0a, 0x13, 0x55, 0x6e, 0x6b, + 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x31, + 0x1a, 0x65, 0x0a, 0x13, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x12, 0x4e, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x31, 0x52, 0x07, + 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x22, 0x4c, 0x0a, 0x08, 0x42, 0x61, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x10, 0x0a, 0x03, 0x54, 0x54, 0x4c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x54, 0x54, + 0x4c, 0x12, 0x2e, 0x0a, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x52, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, + 0x72, 0x22, 0x56, 0x0a, 0x06, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x6a, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x79, 0x65, 0x61, - 0x72, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x04, 0x73, 0x65, 0x71, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x32, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, - 0x33, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x33, 0x12, 0x12, 0x0a, - 0x04, 0x73, 0x65, 0x71, 0x34, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, - 0x34, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, - 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x12, + 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x5f, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x56, 0x31, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x56, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x56, 0x32, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x56, 0x32, 0x12, 0x0e, 0x0a, 0x02, 0x56, 0x33, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x56, 0x33, 0x12, 0x0e, 0x0a, 0x02, 0x56, 0x34, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x56, 0x34, 0x12, 0x0e, 0x0a, 0x02, 0x56, 0x35, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x56, 0x35, 0x2a, 0x43, 0x0a, 0x0a, 0x42, 0x75, + 0x67, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x5f, 0x42, 0x55, 0x47, 0x4c, 0x45, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, + 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x10, 0x13, + 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x61, 0x69, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x10, 0x0e, 0x2a, + 0x98, 0x02, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, + 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x49, 0x53, 0x54, 0x5f, + 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x01, 0x12, + 0x11, 0x0a, 0x0d, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x53, + 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, + 0x47, 0x45, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x17, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x43, 0x4f, 0x4e, + 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, + 0xd7, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x47, 0x45, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, + 0x53, 0x10, 0x10, 0x12, 0x19, 0x0a, 0x15, 0x47, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, + 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x15, 0x12, 0x19, + 0x0a, 0x15, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x59, 0x5f, 0x44, 0x49, 0x54, 0x54, 0x4f, 0x5f, 0x41, + 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x10, 0x16, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x4c, + 0x45, 0x54, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x17, 0x12, 0x12, 0x0a, + 0x0e, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, + 0x19, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x53, 0x5f, 0x42, 0x55, 0x47, 0x4c, 0x45, 0x5f, 0x44, 0x45, + 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x1f, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x45, 0x4e, 0x44, 0x5f, + 0x52, 0x45, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x26, 0x2a, 0x50, 0x0a, 0x0b, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x55, 0x47, 0x4c, 0x45, 0x5f, 0x4d, 0x45, 0x53, + 0x53, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x47, 0x4c, 0x45, 0x5f, + 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x10, 0x42, 0x0e, 0x5a, 0x0c, + 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -984,38 +1690,63 @@ func file_messages_proto_rawDescGZIP() []byte { return file_messages_proto_rawDescData } -var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_messages_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_messages_proto_goTypes = []interface{}{ - (*EncodedPayload)(nil), // 0: messages.EncodedPayload - (*EncodedResponse)(nil), // 1: messages.EncodedResponse - (*MessageData)(nil), // 2: messages.MessageData - (*MsgTypeArr)(nil), // 3: messages.MsgTypeArr - (*EmptyArr)(nil), // 4: messages.EmptyArr - (*AuthMessage)(nil), // 5: messages.AuthMessage - (*ReceiveMessagesRequest)(nil), // 6: messages.ReceiveMessagesRequest - (*BaseData)(nil), // 7: messages.BaseData - (*RPCResponse)(nil), // 8: messages.RPCResponse - (*Device)(nil), // 9: messages.Device - (*Date)(nil), // 10: messages.Date - (*ReceiveMessagesRequest_UnknownEmptyObject1)(nil), // 11: messages.ReceiveMessagesRequest.UnknownEmptyObject1 - (*ReceiveMessagesRequest_UnknownEmptyObject2)(nil), // 12: messages.ReceiveMessagesRequest.UnknownEmptyObject2 + (BugleRoute)(0), // 0: messages.BugleRoute + (ActionType)(0), // 1: messages.ActionType + (MessageType)(0), // 2: messages.MessageType + (*RegisterRefreshPayload)(nil), // 3: messages.RegisterRefreshPayload + (*EmptyRefreshArr)(nil), // 4: messages.EmptyRefreshArr + (*EmptyEmptyArr)(nil), // 5: messages.EmptyEmptyArr + (*InternalMessage)(nil), // 6: messages.InternalMessage + (*InternalMessageData)(nil), // 7: messages.InternalMessageData + (*InternalRequestData)(nil), // 8: messages.InternalRequestData + (*SendMessage)(nil), // 9: messages.SendMessage + (*SendMessageAuth)(nil), // 10: messages.SendMessageAuth + (*SendMessageInternal)(nil), // 11: messages.SendMessageInternal + (*SendMessageData)(nil), // 12: messages.SendMessageData + (*MessageTypeData)(nil), // 13: messages.MessageTypeData + (*EmptyArr)(nil), // 14: messages.EmptyArr + (*AuthMessage)(nil), // 15: messages.AuthMessage + (*ReceiveMessagesRequest)(nil), // 16: messages.ReceiveMessagesRequest + (*BaseData)(nil), // 17: messages.BaseData + (*Device)(nil), // 18: messages.Device + (*ConfigVersion)(nil), // 19: messages.ConfigVersion + (*ReceiveMessagesRequest_UnknownEmptyObject1)(nil), // 20: messages.ReceiveMessagesRequest.UnknownEmptyObject1 + (*ReceiveMessagesRequest_UnknownEmptyObject2)(nil), // 21: messages.ReceiveMessagesRequest.UnknownEmptyObject2 } var file_messages_proto_depIdxs = []int32{ - 9, // 0: messages.MessageData.mobile:type_name -> messages.Device - 9, // 1: messages.MessageData.browser:type_name -> messages.Device - 3, // 2: messages.MessageData.msgTypeArr:type_name -> messages.MsgTypeArr - 4, // 3: messages.MsgTypeArr.emptyArr:type_name -> messages.EmptyArr - 10, // 4: messages.AuthMessage.date:type_name -> messages.Date - 5, // 5: messages.ReceiveMessagesRequest.auth:type_name -> messages.AuthMessage - 12, // 6: messages.ReceiveMessagesRequest.unknown:type_name -> messages.ReceiveMessagesRequest.UnknownEmptyObject2 - 4, // 7: messages.BaseData.emptyArr:type_name -> messages.EmptyArr - 2, // 8: messages.RPCResponse.data:type_name -> messages.MessageData - 11, // 9: messages.ReceiveMessagesRequest.UnknownEmptyObject2.unknown:type_name -> messages.ReceiveMessagesRequest.UnknownEmptyObject1 - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 15, // 0: messages.RegisterRefreshPayload.messageAuth:type_name -> messages.AuthMessage + 18, // 1: messages.RegisterRefreshPayload.currBrowserDevice:type_name -> messages.Device + 4, // 2: messages.RegisterRefreshPayload.emptyRefreshArr:type_name -> messages.EmptyRefreshArr + 5, // 3: messages.EmptyRefreshArr.emptyArr:type_name -> messages.EmptyEmptyArr + 7, // 4: messages.InternalMessage.data:type_name -> messages.InternalMessageData + 0, // 5: messages.InternalMessageData.bugleRoute:type_name -> messages.BugleRoute + 2, // 6: messages.InternalMessageData.messageType:type_name -> messages.MessageType + 18, // 7: messages.InternalMessageData.mobile:type_name -> messages.Device + 18, // 8: messages.InternalMessageData.browser:type_name -> messages.Device + 1, // 9: messages.InternalRequestData.action:type_name -> messages.ActionType + 18, // 10: messages.SendMessage.mobile:type_name -> messages.Device + 12, // 11: messages.SendMessage.messageData:type_name -> messages.SendMessageData + 10, // 12: messages.SendMessage.messageAuth:type_name -> messages.SendMessageAuth + 14, // 13: messages.SendMessage.emptyArr:type_name -> messages.EmptyArr + 19, // 14: messages.SendMessageAuth.configVersion:type_name -> messages.ConfigVersion + 1, // 15: messages.SendMessageInternal.action:type_name -> messages.ActionType + 0, // 16: messages.SendMessageData.bugleRoute:type_name -> messages.BugleRoute + 13, // 17: messages.SendMessageData.messageTypeData:type_name -> messages.MessageTypeData + 14, // 18: messages.MessageTypeData.emptyArr:type_name -> messages.EmptyArr + 2, // 19: messages.MessageTypeData.messageType:type_name -> messages.MessageType + 19, // 20: messages.AuthMessage.configVersion:type_name -> messages.ConfigVersion + 15, // 21: messages.ReceiveMessagesRequest.auth:type_name -> messages.AuthMessage + 21, // 22: messages.ReceiveMessagesRequest.unknown:type_name -> messages.ReceiveMessagesRequest.UnknownEmptyObject2 + 14, // 23: messages.BaseData.emptyArr:type_name -> messages.EmptyArr + 20, // 24: messages.ReceiveMessagesRequest.UnknownEmptyObject2.unknown:type_name -> messages.ReceiveMessagesRequest.UnknownEmptyObject1 + 25, // [25:25] is the sub-list for method output_type + 25, // [25:25] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_messages_proto_init() } @@ -1025,7 +1756,7 @@ func file_messages_proto_init() { } if !protoimpl.UnsafeEnabled { file_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EncodedPayload); i { + switch v := v.(*RegisterRefreshPayload); i { case 0: return &v.state case 1: @@ -1037,7 +1768,7 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EncodedResponse); i { + switch v := v.(*EmptyRefreshArr); i { case 0: return &v.state case 1: @@ -1049,7 +1780,7 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageData); i { + switch v := v.(*EmptyEmptyArr); i { case 0: return &v.state case 1: @@ -1061,7 +1792,7 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgTypeArr); i { + switch v := v.(*InternalMessage); i { case 0: return &v.state case 1: @@ -1073,7 +1804,7 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyArr); i { + switch v := v.(*InternalMessageData); i { case 0: return &v.state case 1: @@ -1085,7 +1816,7 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthMessage); i { + switch v := v.(*InternalRequestData); i { case 0: return &v.state case 1: @@ -1097,7 +1828,7 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReceiveMessagesRequest); i { + switch v := v.(*SendMessage); i { case 0: return &v.state case 1: @@ -1109,7 +1840,7 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BaseData); i { + switch v := v.(*SendMessageAuth); i { case 0: return &v.state case 1: @@ -1121,7 +1852,7 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCResponse); i { + switch v := v.(*SendMessageInternal); i { case 0: return &v.state case 1: @@ -1133,7 +1864,7 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Device); i { + switch v := v.(*SendMessageData); i { case 0: return &v.state case 1: @@ -1145,7 +1876,7 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Date); i { + switch v := v.(*MessageTypeData); i { case 0: return &v.state case 1: @@ -1157,7 +1888,7 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReceiveMessagesRequest_UnknownEmptyObject1); i { + switch v := v.(*EmptyArr); i { case 0: return &v.state case 1: @@ -1169,6 +1900,78 @@ func file_messages_proto_init() { } } file_messages_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AuthMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_messages_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReceiveMessagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_messages_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BaseData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_messages_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Device); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_messages_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConfigVersion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_messages_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReceiveMessagesRequest_UnknownEmptyObject1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_messages_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReceiveMessagesRequest_UnknownEmptyObject2); i { case 0: return &v.state @@ -1181,19 +1984,20 @@ func file_messages_proto_init() { } } } - file_messages_proto_msgTypes[6].OneofWrappers = []interface{}{} + file_messages_proto_msgTypes[13].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_messages_proto_rawDesc, - NumEnums: 0, - NumMessages: 13, + NumEnums: 3, + NumMessages: 19, NumExtensions: 0, NumServices: 0, }, GoTypes: file_messages_proto_goTypes, DependencyIndexes: file_messages_proto_depIdxs, + EnumInfos: file_messages_proto_enumTypes, MessageInfos: file_messages_proto_msgTypes, }.Build() File_messages_proto = out.File diff --git a/libgm/binary/pairing.pb.go b/libgm/binary/pairing.pb.go deleted file mode 100644 index c3576a4..0000000 --- a/libgm/binary/pairing.pb.go +++ /dev/null @@ -1,767 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc v3.21.12 -// source: pairing.proto - -package binary - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -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) -) - -type BrowserDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserAgent string `protobuf:"bytes,1,opt,name=userAgent,proto3" json:"userAgent,omitempty"` - SomeInt int32 `protobuf:"varint,2,opt,name=someInt,proto3" json:"someInt,omitempty"` - Os string `protobuf:"bytes,3,opt,name=os,proto3" json:"os,omitempty"` - SomeBool bool `protobuf:"varint,6,opt,name=someBool,proto3" json:"someBool,omitempty"` -} - -func (x *BrowserDetails) Reset() { - *x = BrowserDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_pairing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BrowserDetails) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BrowserDetails) ProtoMessage() {} - -func (x *BrowserDetails) ProtoReflect() protoreflect.Message { - mi := &file_pairing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BrowserDetails.ProtoReflect.Descriptor instead. -func (*BrowserDetails) Descriptor() ([]byte, []int) { - return file_pairing_proto_rawDescGZIP(), []int{0} -} - -func (x *BrowserDetails) GetUserAgent() string { - if x != nil { - return x.UserAgent - } - return "" -} - -func (x *BrowserDetails) GetSomeInt() int32 { - if x != nil { - return x.SomeInt - } - return 0 -} - -func (x *BrowserDetails) GetOs() string { - if x != nil { - return x.Os - } - return "" -} - -func (x *BrowserDetails) GetSomeBool() bool { - if x != nil { - return x.SomeBool - } - return false -} - -type PhoneRelayBody struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` - Bugle string `protobuf:"bytes,3,opt,name=bugle,proto3" json:"bugle,omitempty"` - RpcKey []byte `protobuf:"bytes,6,opt,name=rpcKey,proto3" json:"rpcKey,omitempty"` - Date *Date `protobuf:"bytes,7,opt,name=date,proto3" json:"date,omitempty"` -} - -func (x *PhoneRelayBody) Reset() { - *x = PhoneRelayBody{} - if protoimpl.UnsafeEnabled { - mi := &file_pairing_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PhoneRelayBody) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PhoneRelayBody) ProtoMessage() {} - -func (x *PhoneRelayBody) ProtoReflect() protoreflect.Message { - mi := &file_pairing_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PhoneRelayBody.ProtoReflect.Descriptor instead. -func (*PhoneRelayBody) Descriptor() ([]byte, []int) { - return file_pairing_proto_rawDescGZIP(), []int{1} -} - -func (x *PhoneRelayBody) GetID() string { - if x != nil { - return x.ID - } - return "" -} - -func (x *PhoneRelayBody) GetBugle() string { - if x != nil { - return x.Bugle - } - return "" -} - -func (x *PhoneRelayBody) GetRpcKey() []byte { - if x != nil { - return x.RpcKey - } - return nil -} - -func (x *PhoneRelayBody) GetDate() *Date { - if x != nil { - return x.Date - } - return nil -} - -type ECDSAKeys struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProtoVersion int64 `protobuf:"varint,1,opt,name=protoVersion,proto3" json:"protoVersion,omitempty"` // idk? - EncryptedKeys []byte `protobuf:"bytes,2,opt,name=encryptedKeys,proto3" json:"encryptedKeys,omitempty"` -} - -func (x *ECDSAKeys) Reset() { - *x = ECDSAKeys{} - if protoimpl.UnsafeEnabled { - mi := &file_pairing_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ECDSAKeys) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ECDSAKeys) ProtoMessage() {} - -func (x *ECDSAKeys) ProtoReflect() protoreflect.Message { - mi := &file_pairing_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ECDSAKeys.ProtoReflect.Descriptor instead. -func (*ECDSAKeys) Descriptor() ([]byte, []int) { - return file_pairing_proto_rawDescGZIP(), []int{2} -} - -func (x *ECDSAKeys) GetProtoVersion() int64 { - if x != nil { - return x.ProtoVersion - } - return 0 -} - -func (x *ECDSAKeys) GetEncryptedKeys() []byte { - if x != nil { - return x.EncryptedKeys - } - return nil -} - -type PairDeviceData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Mobile *Device `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"` - EcdsaKeys *ECDSAKeys `protobuf:"bytes,6,opt,name=ecdsaKeys,proto3" json:"ecdsaKeys,omitempty"` - WebAuthKeyData *WebAuthKey `protobuf:"bytes,2,opt,name=webAuthKeyData,proto3" json:"webAuthKeyData,omitempty"` - Browser *Device `protobuf:"bytes,3,opt,name=browser,proto3" json:"browser,omitempty"` -} - -func (x *PairDeviceData) Reset() { - *x = PairDeviceData{} - if protoimpl.UnsafeEnabled { - mi := &file_pairing_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PairDeviceData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PairDeviceData) ProtoMessage() {} - -func (x *PairDeviceData) ProtoReflect() protoreflect.Message { - mi := &file_pairing_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PairDeviceData.ProtoReflect.Descriptor instead. -func (*PairDeviceData) Descriptor() ([]byte, []int) { - return file_pairing_proto_rawDescGZIP(), []int{3} -} - -func (x *PairDeviceData) GetMobile() *Device { - if x != nil { - return x.Mobile - } - return nil -} - -func (x *PairDeviceData) GetEcdsaKeys() *ECDSAKeys { - if x != nil { - return x.EcdsaKeys - } - return nil -} - -func (x *PairDeviceData) GetWebAuthKeyData() *WebAuthKey { - if x != nil { - return x.WebAuthKeyData - } - return nil -} - -func (x *PairDeviceData) GetBrowser() *Device { - if x != nil { - return x.Browser - } - return nil -} - -type UnpairDeviceData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Browser *Device `protobuf:"bytes,1,opt,name=browser,proto3" json:"browser,omitempty"` -} - -func (x *UnpairDeviceData) Reset() { - *x = UnpairDeviceData{} - if protoimpl.UnsafeEnabled { - mi := &file_pairing_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnpairDeviceData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnpairDeviceData) ProtoMessage() {} - -func (x *UnpairDeviceData) ProtoReflect() protoreflect.Message { - mi := &file_pairing_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnpairDeviceData.ProtoReflect.Descriptor instead. -func (*UnpairDeviceData) Descriptor() ([]byte, []int) { - return file_pairing_proto_rawDescGZIP(), []int{4} -} - -func (x *UnpairDeviceData) GetBrowser() *Device { - if x != nil { - return x.Browser - } - return nil -} - -type WebAuthKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WebAuthKey []byte `protobuf:"bytes,1,opt,name=webAuthKey,proto3" json:"webAuthKey,omitempty"` - ValidFor int64 `protobuf:"varint,2,opt,name=validFor,proto3" json:"validFor,omitempty"` -} - -func (x *WebAuthKey) Reset() { - *x = WebAuthKey{} - if protoimpl.UnsafeEnabled { - mi := &file_pairing_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WebAuthKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WebAuthKey) ProtoMessage() {} - -func (x *WebAuthKey) ProtoReflect() protoreflect.Message { - mi := &file_pairing_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WebAuthKey.ProtoReflect.Descriptor instead. -func (*WebAuthKey) Descriptor() ([]byte, []int) { - return file_pairing_proto_rawDescGZIP(), []int{5} -} - -func (x *WebAuthKey) GetWebAuthKey() []byte { - if x != nil { - return x.WebAuthKey - } - return nil -} - -func (x *WebAuthKey) GetValidFor() int64 { - if x != nil { - return x.ValidFor - } - return 0 -} - -type Container struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PhoneRelay *PhoneRelayBody `protobuf:"bytes,1,opt,name=PhoneRelay,proto3" json:"PhoneRelay,omitempty"` - BrowserDetails *BrowserDetails `protobuf:"bytes,3,opt,name=browserDetails,proto3" json:"browserDetails,omitempty"` - PairDeviceData *PairDeviceData `protobuf:"bytes,4,opt,name=pairDeviceData,proto3" json:"pairDeviceData,omitempty"` - UnpairDeviceData *UnpairDeviceData `protobuf:"bytes,5,opt,name=unpairDeviceData,proto3" json:"unpairDeviceData,omitempty"` -} - -func (x *Container) Reset() { - *x = Container{} - if protoimpl.UnsafeEnabled { - mi := &file_pairing_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Container) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Container) ProtoMessage() {} - -func (x *Container) ProtoReflect() protoreflect.Message { - mi := &file_pairing_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Container.ProtoReflect.Descriptor instead. -func (*Container) Descriptor() ([]byte, []int) { - return file_pairing_proto_rawDescGZIP(), []int{6} -} - -func (x *Container) GetPhoneRelay() *PhoneRelayBody { - if x != nil { - return x.PhoneRelay - } - return nil -} - -func (x *Container) GetBrowserDetails() *BrowserDetails { - if x != nil { - return x.BrowserDetails - } - return nil -} - -func (x *Container) GetPairDeviceData() *PairDeviceData { - if x != nil { - return x.PairDeviceData - } - return nil -} - -func (x *Container) GetUnpairDeviceData() *UnpairDeviceData { - if x != nil { - return x.UnpairDeviceData - } - return nil -} - -type UrlData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PairingKey []byte `protobuf:"bytes,1,opt,name=pairingKey,proto3" json:"pairingKey,omitempty"` - AESCTR256Key []byte `protobuf:"bytes,2,opt,name=AESCTR256Key,proto3" json:"AESCTR256Key,omitempty"` - SHA256Key []byte `protobuf:"bytes,3,opt,name=SHA256Key,proto3" json:"SHA256Key,omitempty"` -} - -func (x *UrlData) Reset() { - *x = UrlData{} - if protoimpl.UnsafeEnabled { - mi := &file_pairing_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UrlData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UrlData) ProtoMessage() {} - -func (x *UrlData) ProtoReflect() protoreflect.Message { - mi := &file_pairing_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UrlData.ProtoReflect.Descriptor instead. -func (*UrlData) Descriptor() ([]byte, []int) { - return file_pairing_proto_rawDescGZIP(), []int{7} -} - -func (x *UrlData) GetPairingKey() []byte { - if x != nil { - return x.PairingKey - } - return nil -} - -func (x *UrlData) GetAESCTR256Key() []byte { - if x != nil { - return x.AESCTR256Key - } - return nil -} - -func (x *UrlData) GetSHA256Key() []byte { - if x != nil { - return x.SHA256Key - } - return nil -} - -var File_pairing_proto protoreflect.FileDescriptor - -var file_pairing_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x07, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x1a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a, 0x0e, 0x42, 0x72, 0x6f, 0x77, - 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, - 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, - 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x6d, 0x65, - 0x49, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6f, 0x6d, 0x65, 0x49, - 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x6f, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6f, 0x6d, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x6f, 0x6d, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x22, 0x72, - 0x0a, 0x0e, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x42, 0x6f, 0x64, 0x79, - 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x44, - 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, 0x67, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x62, 0x75, 0x67, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x70, 0x63, 0x4b, 0x65, 0x79, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x70, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x22, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x65, 0x22, 0x55, 0x0a, 0x09, 0x45, 0x43, 0x44, 0x53, 0x41, 0x4b, 0x65, 0x79, 0x73, 0x12, - 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x4b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x50, 0x61, - 0x69, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x06, - 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x06, - 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x09, 0x65, 0x63, 0x64, 0x73, 0x61, 0x4b, - 0x65, 0x79, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x61, 0x69, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x43, 0x44, 0x53, 0x41, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x09, 0x65, - 0x63, 0x64, 0x73, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x3b, 0x0a, 0x0e, 0x77, 0x65, 0x62, 0x41, - 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x57, 0x65, 0x62, 0x41, 0x75, - 0x74, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x0e, 0x77, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, - 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, - 0x72, 0x22, 0x3e, 0x0a, 0x10, 0x55, 0x6e, 0x70, 0x61, 0x69, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, - 0x72, 0x22, 0x48, 0x0a, 0x0a, 0x57, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, - 0x1e, 0x0a, 0x0a, 0x77, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x77, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, - 0x1a, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, 0x22, 0x8d, 0x02, 0x0a, 0x09, - 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0a, 0x50, 0x68, 0x6f, - 0x6e, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x6c, - 0x61, 0x79, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x0a, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x6c, - 0x61, 0x79, 0x12, 0x3f, 0x0a, 0x0e, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x69, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x12, 0x3f, 0x0a, 0x0e, 0x70, 0x61, 0x69, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, - 0x69, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x61, 0x69, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x0e, 0x70, 0x61, 0x69, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x45, 0x0a, 0x10, 0x75, 0x6e, 0x70, 0x61, 0x69, 0x72, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x6e, 0x70, 0x61, 0x69, 0x72, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x10, 0x75, 0x6e, 0x70, 0x61, 0x69, - 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0x6b, 0x0a, 0x07, 0x55, - 0x72, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, - 0x67, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x69, 0x72, - 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x41, 0x45, 0x53, 0x43, 0x54, 0x52, - 0x32, 0x35, 0x36, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x41, 0x45, - 0x53, 0x43, 0x54, 0x52, 0x32, 0x35, 0x36, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x48, - 0x41, 0x32, 0x35, 0x36, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x53, - 0x48, 0x41, 0x32, 0x35, 0x36, 0x4b, 0x65, 0x79, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, - 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pairing_proto_rawDescOnce sync.Once - file_pairing_proto_rawDescData = file_pairing_proto_rawDesc -) - -func file_pairing_proto_rawDescGZIP() []byte { - file_pairing_proto_rawDescOnce.Do(func() { - file_pairing_proto_rawDescData = protoimpl.X.CompressGZIP(file_pairing_proto_rawDescData) - }) - return file_pairing_proto_rawDescData -} - -var file_pairing_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_pairing_proto_goTypes = []interface{}{ - (*BrowserDetails)(nil), // 0: pairing.BrowserDetails - (*PhoneRelayBody)(nil), // 1: pairing.PhoneRelayBody - (*ECDSAKeys)(nil), // 2: pairing.ECDSAKeys - (*PairDeviceData)(nil), // 3: pairing.PairDeviceData - (*UnpairDeviceData)(nil), // 4: pairing.UnpairDeviceData - (*WebAuthKey)(nil), // 5: pairing.WebAuthKey - (*Container)(nil), // 6: pairing.Container - (*UrlData)(nil), // 7: pairing.UrlData - (*Date)(nil), // 8: messages.Date - (*Device)(nil), // 9: messages.Device -} -var file_pairing_proto_depIdxs = []int32{ - 8, // 0: pairing.PhoneRelayBody.date:type_name -> messages.Date - 9, // 1: pairing.PairDeviceData.mobile:type_name -> messages.Device - 2, // 2: pairing.PairDeviceData.ecdsaKeys:type_name -> pairing.ECDSAKeys - 5, // 3: pairing.PairDeviceData.webAuthKeyData:type_name -> pairing.WebAuthKey - 9, // 4: pairing.PairDeviceData.browser:type_name -> messages.Device - 9, // 5: pairing.UnpairDeviceData.browser:type_name -> messages.Device - 1, // 6: pairing.Container.PhoneRelay:type_name -> pairing.PhoneRelayBody - 0, // 7: pairing.Container.browserDetails:type_name -> pairing.BrowserDetails - 3, // 8: pairing.Container.pairDeviceData:type_name -> pairing.PairDeviceData - 4, // 9: pairing.Container.unpairDeviceData:type_name -> pairing.UnpairDeviceData - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_pairing_proto_init() } -func file_pairing_proto_init() { - if File_pairing_proto != nil { - return - } - file_messages_proto_init() - if !protoimpl.UnsafeEnabled { - file_pairing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BrowserDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pairing_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PhoneRelayBody); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pairing_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ECDSAKeys); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pairing_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PairDeviceData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pairing_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnpairDeviceData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pairing_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebAuthKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pairing_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Container); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pairing_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UrlData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pairing_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pairing_proto_goTypes, - DependencyIndexes: file_pairing_proto_depIdxs, - MessageInfos: file_pairing_proto_msgTypes, - }.Build() - File_pairing_proto = out.File - file_pairing_proto_rawDesc = nil - file_pairing_proto_goTypes = nil - file_pairing_proto_depIdxs = nil -} diff --git a/libgm/binary/raw/authentication.proto b/libgm/binary/raw/authentication.proto new file mode 100644 index 0000000..0bf16ad --- /dev/null +++ b/libgm/binary/raw/authentication.proto @@ -0,0 +1,73 @@ +syntax = "proto3"; +package authentication; + +option go_package = "../../binary"; + +import "messages.proto"; +import "client.proto"; + +message BrowserDetails { + string userAgent = 1; + client.BrowserTypes browserType = 2; + string os = 3; + bool someBool = 6; +} + +message AuthenticationContainer { + AuthenticationMessage authMessage = 1; + BrowserDetails browserDetails = 3; + + oneof data { + KeyData keyData = 4; + CurrentDeviceData deviceData = 5; + } +} + +message AuthenticationMessage { + string requestID = 1; + string network = 3; + bytes tachyonAuthToken = 6; + messages.ConfigVersion configVersion = 7; +} + +message ECDSAKeys { + int64 field1 = 1; // idk? + bytes encryptedKeys = 2; +} + +message KeyData { + messages.Device mobile = 1; + ECDSAKeys ecdsaKeys = 6; + WebAuthKey webAuthKeyData = 2; + messages.Device browser = 3; +} + +message WebAuthKey { + bytes webAuthKey = 1; + int64 validFor = 2; +} + +message CurrentDeviceData { + messages.Device browser = 1; +} + +message UrlData { + bytes pairingKey = 1; + bytes AESKey = 2; + bytes HMACKey = 3; +} + +message TokenData { + bytes tachyonAuthToken = 1; + int64 TTL = 2; +} + +message PairedData { + messages.Device mobile = 1; + TokenData tokenData = 2; + messages.Device browser = 3; +} + +message RevokePairData { + messages.Device revokedDevice = 1; +} diff --git a/libgm/binary/raw/client.proto b/libgm/binary/raw/client.proto index acf6560..b52a180 100644 --- a/libgm/binary/raw/client.proto +++ b/libgm/binary/raw/client.proto @@ -5,12 +5,21 @@ option go_package = "../../binary"; import "messages.proto"; -message SendMessage { - messages.Device pairedDevice = 1; - messages.MessageData messageData = 2; - messages.AuthMessage authData = 3; - int64 TTL = 5; - messages.EmptyArr emptyArr = 9; +message NotifyDittoActivityPayload { + bool success = 2; +} + +message AckMessageResponse { + AckContainer container = 1; +} +message AckContainer { + AckData data = 1; +} +message AckData { + AckAmount ackAmount = 4; +} +message AckAmount { + int32 count = 1; } message AckMessagePayload { @@ -41,3 +50,32 @@ message BugleBackendService { message BugleCode { int64 type = 2; } + +enum BugleMessageType { + UNKNOWN_BUGLE_MESSAGE_TYPE = 0; + SMS = 1; + MMS = 2; + RCS = 3; + CLOUD_SYNC = 4; + IMDN_DELIVERED = 5; + IMDN_DISPLAYED = 6; + IMDN_FALLBACK = 7; + RCS_GENERIC = 8; + FTD = 9; + FT_E2EE_LEGACY = 10; + FT_E2EE_XML = 11; + LIGHTER_MESSAGE = 12; + RBM_SPAM_REPORT = 13; + SATELLITE = 14; +} + +enum BrowserTypes { + UNKNOWN_BROWSER_TYPE = 0; + OTHER = 1; + CHROME = 2; + FIREFOX = 3; + SAFARI = 4; + OPERA = 5; + IE = 6; + EDGE = 7; +} diff --git a/libgm/binary/raw/conversations.proto b/libgm/binary/raw/conversations.proto index dc651f3..6adfe49 100644 --- a/libgm/binary/raw/conversations.proto +++ b/libgm/binary/raw/conversations.proto @@ -3,17 +3,56 @@ package conversations; option go_package = "../../binary"; +import "reactions.proto"; + +message ResendMessagePayload { + string messageID = 2; +} + +message ConversationTypePayload { + string conversationID = 2; +} + +message UpdateConversationPayload { + UpdateConversationData data = 1; + ConversationActionStatus action = 2; + string conversationID = 3; + ConversationAction5 action5 = 5; +} + +message ConversationAction5 { + bool field2 = 2; +} + +message UpdateConversationData { + string conversationID = 1; + oneof data { + ConversationStatus status = 12; + ConversationMuteStatus mute = 7; + } +} + +message DeleteMessagePayload { + string messageID = 2; +} + message SendMessagePayload { string conversationID = 2; MessagePayload messagePayload = 3; string tmpID = 5; + bool isReply = 6; // not sure + ReplyPayload reply = 8; +} + +message ReplyPayload { + string messageID = 1; } message MessagePayload { string tmpID = 1; MessagePayloadContent messagePayloadContent = 6; string conversationID = 7; - string selfParticipantID = 9; // might be participantId + string selfParticipantID = 9; // might be participantID repeated MessageInfo messageInfo = 10; string tmpID2 = 12; } @@ -42,65 +81,57 @@ message ListCoversationsPayload { int64 field4 = 4; // no idea what this is , but only value ive seen is 1 } -message FetchMessagesResponse { - repeated Message messages = 2; - bytes someBytes = 3; - int64 totalMessages = 4; - Cursor cursor = 5; -} - message Cursor { string someStr = 1; int64 nextCursor = 2; } -enum MessageType { - UNKNOWN = 0; - TEXT = 1; - IMAGE = 2; - VIDEO = 3; - AUDIO = 4; - ATTACHMENT = 5; - LOCATION = 6; - RICH_CARD = 7; - VCARD = 8; - MMS_NEEDS_DOWNLOAD = 9; - REPLY = 10; -} - message Message { string messageID = 1; - IsFromMe from = 3; + MsgType msgType = 3; MessageStatus messageStatus = 4; - int64 timestamp = 5; + int64 timestamp = 5; // check this string conversationID = 7; string participantID = 9; repeated MessageInfo messageInfo = 10; - MessageType type = 11; - string tmpId = 12; + int64 type = 11; + string tmpID = 12; + int64 someInt = 16; + repeated reactions.ReactionResponse reactions = 19; + +} + +message ReplyMessage { + string messageID = 1; + string conversationID = 2; // might be participantID + ReplyMessageData replyMessageData = 3; +} + +message ReplyMessageData { + } message MessageInfo { - string orderInternal = 1; + string actionMessageID = 1; oneof data { MessageContent messageContent = 2; - ImageContent imageContent = 3; + MediaContent mediaContent = 3; } } -message ImageContent { - int64 someNumber = 1; - string imageID = 2; - string imageName = 4; +message MediaContent { + MediaFormats format = 1; + string mediaID = 2; + string mediaName = 4; int64 size = 5; - ImagePixels pixels = 6; - bytes imageData = 7; - string imageID2 = 9; + Pixels pixels = 6; + bytes mediaData = 7; + string mediaID2 = 9; bytes decryptionKey = 11; bytes decryptionKey2 = 12; // same value as decryptionkey? } -message ImagePixels { +message Pixels { int64 width = 1; int64 height = 2; } @@ -109,30 +140,16 @@ message MessageContent { string content = 1; } -message IsFromMe { - bool fromMe = 1; -} - -enum MsgStatusCode { - UNKNOWN_STATUS = 0; - SENT = 1; - SENDING = 5; - READ = 11; +message MsgType { + int64 type = 1; } message MessageStatus { - /* - // MMS / SMS - UNKNOWN_STATUS = 0; - SENDING = 5; - SENT = 1; - - // RCS - READ|SEEN = 11; - */ - MsgStatusCode code = 2; + MessageStatusType status = 2; + int64 subCode = 3; string errMsg = 4; - string msgStatus = 5; + string statusText = 5; + int64 thirdCode = 6; } message Conversations { @@ -143,57 +160,201 @@ message Conversation { string conversationID = 1; string name = 2; LatestMessage latestMessage = 4; - int64 timestampMS = 5; + int64 timestampMs = 5; bool isGroupChat = 10; // not certain string selfParticipantID = 11; - /* - 1 = unarchived - 2 = archived - 3 = deleted - */ + //bool bool1 = 13; - int64 status = 12; - string hashHex = 15; - string messageID = 17; + ConvUpdateTypes status = 12; + string avatarHexColor = 15; + string latestMessageID = 17; repeated Participant participants = 20; repeated string otherParticipants = 21; // participant ids excluding me int64 type = 22; + bool subType = 24; + bool thirdType = 29; } message Participant { - UserIdentifier id = 1; + SmallInfo ID = 1; string firstName = 2; string fullName = 3; - string color = 5; + string avatarHexColor = 5; bool isMe = 6; Muted muted = 7; - //bool bool2 = 8; + int64 someInt = 8; string avatarID = 10; - // bool bool3 = 11; int64 bs = 14; string formattedNumber = 15; + int64 someInt1 = 19; + int64 someInt2 = 20; } -message UserIdentifier { +message SmallInfo { int64 type = 1; string number = 2; string participantID = 3; } message LatestMessage { - string content = 1; - bool fromMe = 2; // isMe? + string displayContent = 1; + int64 fromMe = 2; // isMe? string displayName = 4; - //Unknown unknown = 5; + LatestMessageStatus latestMessageStatus = 5; } -message Unknown { - int64 field1 = 1; - int64 field2 = 2; +message LatestMessageStatus { + int64 status2 = 1; + MessageStatusType status = 2; } message Muted { bool isMuted = 1; } + +enum MessageStatusType { + STATUS_UNKNOWN = 0; + OUTGOING_COMPLETE = 1; + OUTGOING_DELIVERED = 2; + OUTGOING_DISPLAYED = 11; + OUTGOING_DRAFT = 3; + OUTGOING_SEND_AFTER_PROCESSING = 10; + OUTGOING_YET_TO_SEND = 4; + OUTGOING_SENDING = 5; + OUTGOING_RESENDING = 6; + OUTGOING_AWAITING_RETRY = 7; + OUTGOING_FAILED_GENERIC = 8; + OUTGOING_FAILED_EMERGENCY_NUMBER = 9; + OUTGOING_CANCELED = 12; + OUTGOING_FAILED_TOO_LARGE = 13; + OUTGOING_NOT_DELIVERED_YET = 14; + OUTGOING_REVOCATION_PENDING = 15; + OUTGOING_SCHEDULED = 16; + OUTGOING_FAILED_RECIPIENT_LOST_RCS = 17; + OUTGOING_FAILED_NO_RETRY_NO_FALLBACK = 18; + OUTGOING_FAILED_RECIPIENT_DID_NOT_DECRYPT = 19; + OUTGOING_VALIDATING = 20; + OUTGOING_FAILED_RECIPIENT_LOST_ENCRYPTION = 21; + OUTGOING_FAILED_RECIPIENT_DID_NOT_DECRYPT_NO_MORE_RETRY = 22; + INCOMING_COMPLETE = 100; + INCOMING_YET_TO_MANUAL_DOWNLOAD = 101; + INCOMING_RETRYING_MANUAL_DOWNLOAD = 102; + INCOMING_MANUAL_DOWNLOADING = 103; + INCOMING_RETRYING_AUTO_DOWNLOAD = 104; + INCOMING_AUTO_DOWNLOADING = 105; + INCOMING_DOWNLOAD_FAILED = 106; + INCOMING_EXPIRED_OR_NOT_AVAILABLE = 107; + INCOMING_DELIVERED = 108; + INCOMING_DISPLAYED = 109; + INCOMING_DOWNLOAD_CANCELED = 110; + INCOMING_DOWNLOAD_FAILED_TOO_LARGE = 111; + INCOMING_DOWNLOAD_FAILED_SIM_HAS_NO_DATA = 112; + INCOMING_FAILED_TO_DECRYPT = 113; + INCOMING_DECRYPTION_ABORTED = 114; + /* + TOMBSTONE_PARTICIPANT_JOINED = BasePaymentResult.ERROR_REQUEST_FAILED; + TOMBSTONE_PARTICIPANT_LEFT = BasePaymentResult.ERROR_REQUEST_TIMEOUT; + TOMBSTONE_SELF_LEFT = BasePaymentResult.ERROR_REQUEST_CONNECTION_FAILED; + TOMBSTONE_RCS_GROUP_CREATED = BasePaymentResult.ERROR_BOT_DOMAIN_NOT_WHITELISTED; + */ + TOMBSTONE_MMS_GROUP_CREATED = 204; + TOMBSTONE_SMS_BROADCAST_CREATED = 205; + TOMBSTONE_ONE_ON_ONE_SMS_CREATED = 206; + TOMBSTONE_ONE_ON_ONE_RCS_CREATED = 207; + TOMBSTONE_SWITCH_TO_GROUP_MMS = 208; + TOMBSTONE_SWITCH_TO_BROADCAST_SMS = 209; + TOMBSTONE_SHOW_LINK_PREVIEWS = 210; + TOMBSTONE_GROUP_RENAMED_LOCAL = 211; + TOMBSTONE_VERIFIED_SMS_APPLICABLE = 212; + TOMBSTONE_ENCRYPTED_ONE_ON_ONE_RCS_CREATED = 213; + TOMBSTONE_PROTOCOL_SWITCH_TO_TEXT = 214; + TOMBSTONE_PROTOCOL_SWITCH_TO_RCS = 215; + TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS = 216; + TOMBSTONE_GROUP_RENAMED_GLOBAL = 217; + TOMBSTONE_GROUP_NAME_CLEARED_GLOBAL = 218; + TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS_INFO = 219; + TOMBSTONE_SELF_REMOVED_FROM_GROUP = 220; + MESSAGE_STATUS_TOMBSTONE_PARTICIPANT_REMOVED_FROM_GROUP = 221; + MESSAGE_STATUS_TOMBSTONE_SMS_NORM_PARTICIPANT_UPGRADED = 222; + MESSAGE_STATUS_TOMBSTONE_RCS_NORM_PARTICIPANT_UPGRADED = 223; + MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_RCS_NORM_PARTICIPANT_UPGRADED = 224; + MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_JOINED = 225; + MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_JOINED_INFO = 226; + MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_LEFT = 227; + MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_SELF_LEFT = 228; + MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_CREATED = 229; + MESSAGE_STATUS_TOMBSTONE_SELF_REMOVED_FROM_ENCRYPTED_GROUP = 230; + MESSAGE_STATUS_TOMBSTONE_PARTICIPANT_REMOVED_FROM_ENCRYPTED_GROUP = 231; + MESSAGE_STATUS_TOMBSTONE_SUGGESTION_SHORTCUT_STAR_TOOLSTONE = 232; + MESSAGE_STATUS_TOMBSTONE_GROUP_PROTOCOL_SWITCH_RCS_TO_E2EE = 233; + MESSAGE_STATUS_TOMBSTONE_GROUP_PROTOCOL_SWITCH_E2EE_TO_RCS = 234; + MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_TEXT_TO_E2EE = 235; + MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_E2EE_TO_TEXT = 236; + MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_RCS_TO_E2EE = 237; + MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_E2EE_TO_RCS = 238; + MESSAGE_STATUS_TOMBSTONE_SATELLITE_EDUCATION = 239; + MESSAGE_DELETED = 300; +} + +enum ConversationStatus { + UNKNOWN_STATUS = 0; + UNARCHIVE = 1; + ARCHIVE = 2; + DELETE = 3; +} + +enum ConversationActionStatus { + UNKNOWN_ACTION_STATUS = 0; + UNBLOCK = 2; + BLOCK = 7; + BLOCK_AND_REPORT = 8; +} + +enum ConversationMuteStatus { + UNMUTE = 0; + MUTE = 1; +} + +enum ConvUpdateTypes { + UNKNOWN_CONVTYPE = 0; + UNARCHIVED = 1; + ARCHIVED = 2; + DELETED = 3; + BLOCKED_AND_REPORTED = 5; + BLOCKED = 6; +} + +enum MediaFormats { + UNSPECIFIED_TYPE = 0; + IMAGE_JPEG = 1; + IMAGE_JPG = 2; + IMAGE_PNG = 3; + IMAGE_GIF = 4; + IMAGE_WBMP = 5; + IMAGE_X_MS_BMP = 6; + IMAGE_UNSPECIFIED = 7; + VIDEO_MP4 = 8; + VIDEO_3G2 = 9; + VIDEO_3GPP = 10; + VIDEO_WEBM = 11; + VIDEO_MKV = 12; + VIDEO_UNSPECIFIED = 13; + AUDIO_AAC = 14; + AUDIO_AMR = 15; + AUDIO_MP3 = 16; + AUDIO_MPEG = 17; + AUDIO_MPG = 18; + AUDIO_MP4 = 19; + AUDIO_MP4_LATM = 20; + AUDIO_3GPP = 21; + AUDIO_OGG = 22; + AUDIO_UNSPECIFIED = 23; + TEXT_VCARD = 24; + APP_PDF = 28; + APP_TXT = 29; + APP_HTML = 30; + AUDIO_OGG2 = 31; + APP_SMIL = 32; +} diff --git a/libgm/binary/raw/events.proto b/libgm/binary/raw/events.proto index dbbbbfc..42b4ca6 100644 --- a/libgm/binary/raw/events.proto +++ b/libgm/binary/raw/events.proto @@ -4,26 +4,32 @@ package events; option go_package = "../../binary"; import "conversations.proto"; +import "authentication.proto"; +import "settings.proto"; + /* - Cases - 2 = CONVERSATION - 3 = MESSAGE - 5 = PHONE SETTINGS - 6 = Cases - 2 = updated session - 8 = INACTIVE_LACK_OF_ACTIVITY - 7 = BROWSER_INACTIVE_FROM_TIMEOUT - 6|5 = user_alert:battery - 3|4 = user_alert:data_connection - 10 = OBSERVER_REGISTERED + ConversationEvent = 2 + MessageEvent = 3 + TypingEvent = 4 + SettingsEvent = 5 + UserAlertEvent = 6 + BrowserPresenceCheckEvent = 7 + ParticipantsEvent = 8 + ConversationTypeEvent = 9 + FavoriteStickersEvent = 10 + RecentStickerEvent = 11 + CloudStoreInfoEvent = 12 + BlobForAttachmentProgressUpdate = 13 */ -message Event { +message UpdateEvents { oneof event { ConversationEvent conversationEvent = 2; MessageEvent messageEvent = 3; + TypingEvent typingEvent = 4; + settings.Settings settingsEvent = 5; UserAlertEvent userAlertEvent = 6; } } @@ -32,25 +38,78 @@ message ConversationEvent { conversations.Conversation data = 2; } +message TypingEvent { + TypingData data = 2; +} + message MessageEvent { conversations.Message data = 2; } message UserAlertEvent { - /* - 2 = BROWSER_ACTIVE (new session created in other browser) - - 1 = ? - - 8 = INACTIVE_LACK_OF_ACTIVITY - - 7 = INACTIVE_TIMEOUT - - 5|6 = BATTERY (tf?) - - 3|4 = DATA_CONNECTION (tf?) - - 10 = OBSERVER_REGISTERED (tf?) - */ - int64 alertType = 2; + AlertType alertType = 2; +} + +message TypingData { + string conversationID = 1; + User user = 2; + TypingTypes type = 3; +} + +message User { + int64 field1 = 1; + string number = 2; +} + +message PairEvents { + oneof event { + authentication.PairedData paired = 4; + authentication.RevokePairData revoked = 5; + } +} + +enum AlertType { + ALERT_TYPE_UNKNOWN = 0; + BROWSER_INACTIVE = 1; // Emitted whenever browser connection becomes inactive + BROWSER_ACTIVE = 2; // Emitted whenever a new browser session is created + MOBILE_DATA_CONNECTION = 3; // Emitted when the paired device connects to data + MOBILE_WIFI_CONNECTION = 4; // Emitted when the paired device connects to wifi + MOBILE_BATTERY_LOW = 5; // Emitted if the paired device reaches low battery + MOBILE_BATTERY_RESTORED = 6; // Emitted if the paired device has restored battery enough to not be considered low + BROWSER_INACTIVE_FROM_TIMEOUT = 7; // Emitted whenever browser connection becomes inactive due to timeout + BROWSER_INACTIVE_FROM_INACTIVITY = 8; // Emitted whenever browser connection becomes inactive due to inactivity + RCS_CONNECTION = 9; // Emitted whenever RCS connection has been established successfully + OBSERVER_REGISTERED = 10; // Unknown + MOBILE_DATABASE_SYNCING = 11; // Emitted whenever the paired device is attempting to sync db + MOBILE_DATABASE_SYNC_COMPLETE = 12; // Emitted whenever the paired device has completed the db sync + MOBILE_DATABASE_SYNC_STARTED = 13; // Emitted whenever the paired device has begun syncing the db + MOBILE_DATABASE_PARTIAL_SYNC_COMPLETED = 14; // Emitted whenever the paired device has successfully synced a chunk of the db + MOBILE_DATABASE_PARTIAL_SYNC_STARTED = 15; // Emitted whenever the paired device has begun syncing a chunk of the db + CONTACTS_REFRESH_STARTED = 16; // Emitted whenever the paired device has begun refreshing contacts + CONTACTS_REFRESH_COMPLETED = 17; // Emitted whenever the paired device has successfully refreshed contacts +} + +enum GRPCStatus { + OK = 0; + CANCELLED = 1; + UNKNOWN = 2; + INVALID_ARGUMENT = 3; + DEADLINE_EXCEEDED = 4; + NOT_FOUND = 5; + ALREADY_EXISTS = 6; + PERMISSION_DENIED = 7; + RESOURCE_EXHAUSTED = 8; + FAILED_PRECONDITION = 9; + ABORTED = 10; + OUT_OF_RANGE = 11; + UNIMPLEMENTED = 12; + INTERNAL = 13; + UNAVAILABLE = 14; + DATA_LOSS = 15; + UNAUTHENTICATED = 16; +} + +enum TypingTypes { + STOPPED_TYPING = 0; + STARTED_TYPING = 1; } diff --git a/libgm/binary/raw/messages.proto b/libgm/binary/raw/messages.proto index 1ed21fc..41064e8 100644 --- a/libgm/binary/raw/messages.proto +++ b/libgm/binary/raw/messages.proto @@ -3,42 +3,128 @@ package messages; option go_package = "../../binary"; -message EncodedPayload { - string requestID = 1; - int64 opcode = 2; - bytes encryptedData = 5; - string sessionID = 6; +message RegisterRefreshPayload { + AuthMessage messageAuth = 1; + Device currBrowserDevice = 2; + int64 unixTimestamp = 3; + string signature = 4; + EmptyRefreshArr emptyRefreshArr = 13; + int32 messageType = 16; } -message EncodedResponse { - string requestID = 1; - //int64 msg = 2; - int64 unixNano = 3; - int64 opcode = 4; - //bytes keyData = 5; - bool sub = 6; - int64 third = 7; - bytes encryptedData = 8; - bool field9 = 9; +message EmptyRefreshArr { + EmptyEmptyArr emptyArr = 9; } -message MessageData { - string requestID = 1; - int64 routingOpCode = 2; - string ts1 = 3; - int64 field5 = 5; - string ts2 = 6; - string someString = 7; +message EmptyEmptyArr { + +} + +message InternalMessage { + bytes unknown1 = 1; + InternalMessageData data = 2; +} + +message InternalMessageData { + string responseID = 1; + BugleRoute bugleRoute = 2; + string startExecute = 3; + //bytes unknown4 = 4; + MessageType messageType = 5; + string finishExecute = 6; + string millisecondsTaken = 7; Device mobile = 8; Device browser = 9; - string encodedData = 12; - string encodedRequestID = 17; - MsgTypeArr msgTypeArr = 23; + //bytes unknown5 = 10; + //bytes unknown6 = 11; + bytes protobufData = 12; + //bytes unknown7 = 13; + //bytes unknown8 = 14; + //bytes unknown9 = 15; + //bytes unknown10 = 16; + string signatureID = 17; + //bytes unknown11 = 18; + //bytes unknown12 = 19; + //bytes unknown13 = 20; + string timestamp = 21; } -message MsgTypeArr { +message InternalRequestData { + string sessionID = 1; + int64 timestamp = 3; + ActionType action = 4; + bool bool1 = 6; + bool bool2 = 7; + bytes encryptedData = 8; + bool bool3 = 9; +} + +message SendMessage { + Device mobile = 1; + SendMessageData messageData = 2; + SendMessageAuth messageAuth = 3; + //bytes unknown1 = 4; + int64 TTL = 5; // might be something related to config + //bytes unknown2 = 6; + //bytes unknown3 = 7; + //bytes unknown4 = 8; + EmptyArr emptyArr = 9; +} + +message SendMessageAuth { + string requestID = 1; + //bytes unknown1 = 2; + //bytes unknown2 = 3; + //bytes unknown3 = 4; + //bytes unknown4 = 5; + bytes tachyonAuthToken = 6; + ConfigVersion configVersion = 7; +} + +message SendMessageInternal { + string requestID = 1; + ActionType action = 2; + bytes encryptedProtoData = 5; + string sessionID = 6; +} +/* +requestID = 1 + +encodedData = { + requestID = 1 ^same + + sessionID = 6 +} +*/ +message SendMessageData { + string requestID = 1; + BugleRoute bugleRoute = 2; + //bytes unknown1 = 3; + //bytes unknown2 = 4; + //bytes unknown3 = 5; + //bytes unknown4 = 6; + //bytes unknown5 = 7; + //bytes unknown6 = 8; + //bytes unknown7 = 9; + //bytes unknown8 = 10; + //bytes unknown9 = 11; + bytes protobufData = 12; + //bytes unknown10 = 13; + //bytes unknown11 = 14; + //bytes unknown12 = 15; + //bytes unknown13 = 16; + //bytes unknown14 = 17; + //bytes unknown15 = 18; + //bytes unknown16 = 19; + //bytes unknown17 = 20; + //bytes unknown18 = 21; + //bytes unknown19 = 22; + MessageTypeData messageTypeData = 23; +} + +message MessageTypeData { EmptyArr emptyArr = 1; - int64 msgType = 2; + MessageType messageType = 2; } message EmptyArr { @@ -47,8 +133,8 @@ message EmptyArr { message AuthMessage { string requestID = 1; - bytes rpcKey = 6; - Date date = 7; + bytes tachyonAuthToken = 6; + ConfigVersion configVersion = 7; } message ReceiveMessagesRequest { @@ -66,21 +152,54 @@ message BaseData { EmptyArr emptyArr = 6; } -message RPCResponse { - bytes unknown = 1; - MessageData data = 2; -} - message Device { int64 userID = 1; - string registrationID = 2; + string sourceID = 2; string network = 3; } -message Date { - int64 year = 3; - int64 seq1 = 4; - int64 seq2 = 5; - int64 seq3 = 7; - int64 seq4 = 9; +enum BugleRoute { + UNKNOWN_BUGLE_ROUTE = 0; + DataEvent = 19; + PairEvent = 14; +} +/* +enum EventType { + UNKNOWN_EVENT_TYPE = 0; + ONE = 1; + TWO = 2; + THREE = 3; + FOUR = 4; + FIVE = 5; + SIXTEEN = 16; +} +*/ + +message ConfigVersion { + int32 V1 = 3; + int32 V2 = 4; + int32 V3 = 5; + int32 V4 = 7; + int32 V5 = 9; +} + +enum ActionType { + UNKNOWN_ACTION_TYPE = 0; + LIST_CONVERSATIONS = 1; + LIST_MESSAGES = 2; + SEND_MESSAGE = 3; + LIST_CONVERSATIONS_SYNC = 1111; + GET_UPDATES = 16; + GET_CONVERSATION_TYPE = 21; + NOTIFY_DITTO_ACTIVITY = 22; + DELETE_MESSAGE = 23; + RESEND_MESSAGE = 25; + IS_BUGLE_DEFAULT = 31; + SEND_REACTION = 38; +} + +enum MessageType { + UNKNOWN_MESSAGE_TYPE = 0; + BUGLE_MESSAGE = 2; + BUGLE_ANNOTATION = 16; } diff --git a/libgm/binary/raw/pairing.proto b/libgm/binary/raw/pairing.proto deleted file mode 100644 index 3bc3af6..0000000 --- a/libgm/binary/raw/pairing.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; -package pairing; - -option go_package = "../../binary"; - -import "messages.proto"; - -message BrowserDetails { - string userAgent = 1; - int32 someInt = 2; - string os = 3; - bool someBool = 6; -} - -message PhoneRelayBody { - string ID = 1; - string bugle = 3; - bytes rpcKey = 6; - messages.Date date = 7; -} - -message ECDSAKeys { - int64 protoVersion = 1; // idk? - bytes encryptedKeys = 2; -} - -message PairDeviceData { - messages.Device mobile = 1; - ECDSAKeys ecdsaKeys = 6; - WebAuthKey webAuthKeyData = 2; - messages.Device browser = 3; -} - -message UnpairDeviceData { - messages.Device browser = 1; -} - -message WebAuthKey { - bytes webAuthKey = 1; - int64 validFor = 2; -} - -message Container { - PhoneRelayBody PhoneRelay = 1; - BrowserDetails browserDetails = 3; - PairDeviceData pairDeviceData = 4; - UnpairDeviceData unpairDeviceData = 5; -} - -message UrlData { - bytes pairingKey = 1; - bytes AESCTR256Key = 2; - bytes SHA256Key = 3; -} diff --git a/libgm/binary/raw/reactions.proto b/libgm/binary/raw/reactions.proto new file mode 100644 index 0000000..6e553b6 --- /dev/null +++ b/libgm/binary/raw/reactions.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; +package reactions; + +option go_package = "../../binary"; + +enum Reaction { + UNSPECIFIED = 0; + ADD = 1; + REMOVE = 2; + SWITCH = 3; +} + +message SendReactionPayload { + string messageID = 1; + ReactionData reactionData = 2; + Reaction action = 3; +} + +message SendReactionResponse { + bool success = 1; +} + +message ReactionData { + bytes emojiUnicode = 1; + int64 emojiType = 2; +} + +message ReactionResponse { + ReactionData data = 1; + repeated string reactorParticipantsID = 2; // participants reacted with this emoji +} + +message EmojiMeta { + repeated EmojiMetaData emojiMetaData = 1; +} + +message EmojiMetaData { + bytes emojiUnicode = 1; + repeated string names = 2; +} + +enum Emojis { + REACTION_TYPE_UNSPECIFIED = 0; + LIKE = 1; + LOVE = 2; + LAUGH = 3; + SURPRISED = 4; + SAD = 5; + ANGRY = 6; + DISLIKE = 7; + CUSTOM = 8; + QUESTIONING = 9; + CRYING_FACE = 10; + POUTING_FACE = 11; + RED_HEART = 12; +} diff --git a/libgm/binary/raw/relay.proto b/libgm/binary/raw/relay.proto deleted file mode 100644 index 0f943f7..0000000 --- a/libgm/binary/raw/relay.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; -package registerPhoneRelay; - -option go_package = "../../binary"; - -message RegisterPhoneRelayResponse { - Message1 field1 = 1; - Message2 field2 = 2; - bytes pairingKey = 3; - int64 field4 = 4; - Message3 field5 = 5; - bytes field6 = 6; -} - -message Message1 { - int64 pubKey = 2; -} - -message Message2 { - int64 field1 = 1; - bytes field2 = 2; - string field3 = 3; -} - -message Message3 { - bytes rpcKey = 1; - int64 field2 = 2; -} - -message RefreshPhoneRelayResponse { - Message1 field1 = 1; - bytes pairKey = 2; - int64 validFor = 3; -} - -message WebEncryptionKeyResponse { - Message1 curve = 1; - bytes key = 2; -} diff --git a/libgm/binary/raw/responses.proto b/libgm/binary/raw/responses.proto index 784cab7..8d02e9f 100644 --- a/libgm/binary/raw/responses.proto +++ b/libgm/binary/raw/responses.proto @@ -3,17 +3,95 @@ package responses; option go_package = "../../binary"; -import "settings.proto"; +import "events.proto"; +import "messages.proto"; import "conversations.proto"; -message PrepareNewSession { +message RegisterRefreshResponse { + RefreshAuthData tokenData = 2; +} + +message RefreshAuthData { + bytes tachyonAuthToken = 1; + string validFor = 2; +} + +message FetchMessagesResponse { + repeated conversations.Message messages = 2; + bytes someBytes = 3; + int64 totalMessages = 4; + conversations.Cursor cursor = 5; +} + +message DeleteMessageResponse { + bool success = 2; +} + +message UpdateConversationResponse { + bool success = 1; + /* + 3 { + 1 { + 1 { + 3: "11" + } + 13: 2 + } + 3: 1 + } + */ +} + +message GetConversationTypeResponse { + string conversationID = 2; + int32 type = 3; + bool bool1 = 5; + int32 number2 = 6; +} + +message NotifyDittoActivityResponse {} + +message IsBugleDefaultResponse { bool success = 1; } -message NewSession { - settings.Settings settings = 5; +message GetUpdatesResponse { + events.UserAlertEvent data = 6; } message SendMessageResponse { - conversations.MessageType type = 3; + int64 type = 3; +} + +message RefreshPhoneRelayResponse { + CoordinateMessage coordinates = 1; + bytes pairKey = 2; + int64 validFor = 3; +} + +message WebEncryptionKeyResponse { + CoordinateMessage coordinates = 1; + bytes key = 2; +} + +message RegisterPhoneRelayResponse { + CoordinateMessage coordinates = 1; + messages.Device browser = 2; + bytes pairingKey = 3; + int64 validFor = 4; + AuthKeyData authKeyData = 5; + string responseID = 6; +} + +message CoordinateMessage { + int64 coord1 = 2; +} + +message AuthKeyData { + bytes tachyonAuthToken = 1; + int64 validFor = 2; +} + +enum ConversationType { + UNKNOWN_CONVERSATION_TYPE = 0; } diff --git a/libgm/binary/raw/settings.proto b/libgm/binary/raw/settings.proto index 11a5d15..c9a7c1d 100644 --- a/libgm/binary/raw/settings.proto +++ b/libgm/binary/raw/settings.proto @@ -6,9 +6,9 @@ option go_package = "../../binary"; message Settings { Data data = 2; - OpCodeData opCodeData = 3; - BooleanFields boolFields = 4; - string version = 5; + SomeData opCodeData = 3; + RCSSettings rcsSettings = 4; + string bugleVersion = 5; bool bool1 = 7; BooleanFields2 boolFields2 = 8; string emptyString = 9; @@ -16,12 +16,16 @@ message Settings { } message Data { // i think its simdata? no clue - BoolMsg boolMsg = 3; + RCSChats rcsChats = 3; SimData simData = 5; bool bool1 = 6; NoClue noClue = 7; } +message RCSChats { + bool enabled = 1; +} + message BoolMsg { bool bool1 = 1; } @@ -43,15 +47,18 @@ message NoClue { // just a guess lol string count = 1; } -message OpCodeData { +message SomeData { bool field7 = 7; + bool field12 = 12; + repeated bytes someEmojis = 15; string jsonData = 16; + string someString = 17; } -message BooleanFields { - bool bool1 = 1; - bool bool2 = 2; - bool bool3 = 3; +message RCSSettings { + bool isEnabled = 1; + bool sendReadReceipts = 2; + bool showTypingIndicators = 3; bool bool4 = 4; } diff --git a/libgm/binary/reactions.pb.go b/libgm/binary/reactions.pb.go new file mode 100644 index 0000000..c7346c7 --- /dev/null +++ b/libgm/binary/reactions.pb.go @@ -0,0 +1,670 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.21.12 +// source: reactions.proto + +package binary + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +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) +) + +type Reaction int32 + +const ( + Reaction_UNSPECIFIED Reaction = 0 + Reaction_ADD Reaction = 1 + Reaction_REMOVE Reaction = 2 + Reaction_SWITCH Reaction = 3 +) + +// Enum value maps for Reaction. +var ( + Reaction_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "ADD", + 2: "REMOVE", + 3: "SWITCH", + } + Reaction_value = map[string]int32{ + "UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2, + "SWITCH": 3, + } +) + +func (x Reaction) Enum() *Reaction { + p := new(Reaction) + *p = x + return p +} + +func (x Reaction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Reaction) Descriptor() protoreflect.EnumDescriptor { + return file_reactions_proto_enumTypes[0].Descriptor() +} + +func (Reaction) Type() protoreflect.EnumType { + return &file_reactions_proto_enumTypes[0] +} + +func (x Reaction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Reaction.Descriptor instead. +func (Reaction) EnumDescriptor() ([]byte, []int) { + return file_reactions_proto_rawDescGZIP(), []int{0} +} + +type Emojis int32 + +const ( + Emojis_REACTION_TYPE_UNSPECIFIED Emojis = 0 + Emojis_LIKE Emojis = 1 + Emojis_LOVE Emojis = 2 + Emojis_LAUGH Emojis = 3 + Emojis_SURPRISED Emojis = 4 + Emojis_SAD Emojis = 5 + Emojis_ANGRY Emojis = 6 + Emojis_DISLIKE Emojis = 7 + Emojis_CUSTOM Emojis = 8 + Emojis_QUESTIONING Emojis = 9 + Emojis_CRYING_FACE Emojis = 10 + Emojis_POUTING_FACE Emojis = 11 + Emojis_RED_HEART Emojis = 12 +) + +// Enum value maps for Emojis. +var ( + Emojis_name = map[int32]string{ + 0: "REACTION_TYPE_UNSPECIFIED", + 1: "LIKE", + 2: "LOVE", + 3: "LAUGH", + 4: "SURPRISED", + 5: "SAD", + 6: "ANGRY", + 7: "DISLIKE", + 8: "CUSTOM", + 9: "QUESTIONING", + 10: "CRYING_FACE", + 11: "POUTING_FACE", + 12: "RED_HEART", + } + Emojis_value = map[string]int32{ + "REACTION_TYPE_UNSPECIFIED": 0, + "LIKE": 1, + "LOVE": 2, + "LAUGH": 3, + "SURPRISED": 4, + "SAD": 5, + "ANGRY": 6, + "DISLIKE": 7, + "CUSTOM": 8, + "QUESTIONING": 9, + "CRYING_FACE": 10, + "POUTING_FACE": 11, + "RED_HEART": 12, + } +) + +func (x Emojis) Enum() *Emojis { + p := new(Emojis) + *p = x + return p +} + +func (x Emojis) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Emojis) Descriptor() protoreflect.EnumDescriptor { + return file_reactions_proto_enumTypes[1].Descriptor() +} + +func (Emojis) Type() protoreflect.EnumType { + return &file_reactions_proto_enumTypes[1] +} + +func (x Emojis) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Emojis.Descriptor instead. +func (Emojis) EnumDescriptor() ([]byte, []int) { + return file_reactions_proto_rawDescGZIP(), []int{1} +} + +type SendReactionPayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageID string `protobuf:"bytes,1,opt,name=messageID,proto3" json:"messageID,omitempty"` + ReactionData *ReactionData `protobuf:"bytes,2,opt,name=reactionData,proto3" json:"reactionData,omitempty"` + Action Reaction `protobuf:"varint,3,opt,name=action,proto3,enum=reactions.Reaction" json:"action,omitempty"` +} + +func (x *SendReactionPayload) Reset() { + *x = SendReactionPayload{} + if protoimpl.UnsafeEnabled { + mi := &file_reactions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendReactionPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendReactionPayload) ProtoMessage() {} + +func (x *SendReactionPayload) ProtoReflect() protoreflect.Message { + mi := &file_reactions_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendReactionPayload.ProtoReflect.Descriptor instead. +func (*SendReactionPayload) Descriptor() ([]byte, []int) { + return file_reactions_proto_rawDescGZIP(), []int{0} +} + +func (x *SendReactionPayload) GetMessageID() string { + if x != nil { + return x.MessageID + } + return "" +} + +func (x *SendReactionPayload) GetReactionData() *ReactionData { + if x != nil { + return x.ReactionData + } + return nil +} + +func (x *SendReactionPayload) GetAction() Reaction { + if x != nil { + return x.Action + } + return Reaction_UNSPECIFIED +} + +type SendReactionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *SendReactionResponse) Reset() { + *x = SendReactionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_reactions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendReactionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendReactionResponse) ProtoMessage() {} + +func (x *SendReactionResponse) ProtoReflect() protoreflect.Message { + mi := &file_reactions_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendReactionResponse.ProtoReflect.Descriptor instead. +func (*SendReactionResponse) Descriptor() ([]byte, []int) { + return file_reactions_proto_rawDescGZIP(), []int{1} +} + +func (x *SendReactionResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type ReactionData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EmojiUnicode []byte `protobuf:"bytes,1,opt,name=emojiUnicode,proto3" json:"emojiUnicode,omitempty"` + EmojiType int64 `protobuf:"varint,2,opt,name=emojiType,proto3" json:"emojiType,omitempty"` +} + +func (x *ReactionData) Reset() { + *x = ReactionData{} + if protoimpl.UnsafeEnabled { + mi := &file_reactions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReactionData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReactionData) ProtoMessage() {} + +func (x *ReactionData) ProtoReflect() protoreflect.Message { + mi := &file_reactions_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReactionData.ProtoReflect.Descriptor instead. +func (*ReactionData) Descriptor() ([]byte, []int) { + return file_reactions_proto_rawDescGZIP(), []int{2} +} + +func (x *ReactionData) GetEmojiUnicode() []byte { + if x != nil { + return x.EmojiUnicode + } + return nil +} + +func (x *ReactionData) GetEmojiType() int64 { + if x != nil { + return x.EmojiType + } + return 0 +} + +type ReactionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *ReactionData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + ReactorParticipantsID []string `protobuf:"bytes,2,rep,name=reactorParticipantsID,proto3" json:"reactorParticipantsID,omitempty"` // participants reacted with this emoji +} + +func (x *ReactionResponse) Reset() { + *x = ReactionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_reactions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReactionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReactionResponse) ProtoMessage() {} + +func (x *ReactionResponse) ProtoReflect() protoreflect.Message { + mi := &file_reactions_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReactionResponse.ProtoReflect.Descriptor instead. +func (*ReactionResponse) Descriptor() ([]byte, []int) { + return file_reactions_proto_rawDescGZIP(), []int{3} +} + +func (x *ReactionResponse) GetData() *ReactionData { + if x != nil { + return x.Data + } + return nil +} + +func (x *ReactionResponse) GetReactorParticipantsID() []string { + if x != nil { + return x.ReactorParticipantsID + } + return nil +} + +type EmojiMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EmojiMetaData []*EmojiMetaData `protobuf:"bytes,1,rep,name=emojiMetaData,proto3" json:"emojiMetaData,omitempty"` +} + +func (x *EmojiMeta) Reset() { + *x = EmojiMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_reactions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmojiMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmojiMeta) ProtoMessage() {} + +func (x *EmojiMeta) ProtoReflect() protoreflect.Message { + mi := &file_reactions_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmojiMeta.ProtoReflect.Descriptor instead. +func (*EmojiMeta) Descriptor() ([]byte, []int) { + return file_reactions_proto_rawDescGZIP(), []int{4} +} + +func (x *EmojiMeta) GetEmojiMetaData() []*EmojiMetaData { + if x != nil { + return x.EmojiMetaData + } + return nil +} + +type EmojiMetaData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EmojiUnicode []byte `protobuf:"bytes,1,opt,name=emojiUnicode,proto3" json:"emojiUnicode,omitempty"` + Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"` +} + +func (x *EmojiMetaData) Reset() { + *x = EmojiMetaData{} + if protoimpl.UnsafeEnabled { + mi := &file_reactions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmojiMetaData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmojiMetaData) ProtoMessage() {} + +func (x *EmojiMetaData) ProtoReflect() protoreflect.Message { + mi := &file_reactions_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmojiMetaData.ProtoReflect.Descriptor instead. +func (*EmojiMetaData) Descriptor() ([]byte, []int) { + return file_reactions_proto_rawDescGZIP(), []int{5} +} + +func (x *EmojiMetaData) GetEmojiUnicode() []byte { + if x != nil { + return x.EmojiUnicode + } + return nil +} + +func (x *EmojiMetaData) GetNames() []string { + if x != nil { + return x.Names + } + return nil +} + +var File_reactions_proto protoreflect.FileDescriptor + +var file_reactions_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x9d, 0x01, 0x0a, + 0x13, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, + 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x49, 0x44, 0x12, 0x3b, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x2b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x13, 0x2e, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x30, 0x0a, 0x14, + 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x50, + 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, + 0x0a, 0x0c, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x55, 0x6e, 0x69, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x55, 0x6e, 0x69, 0x63, 0x6f, + 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x75, 0x0a, 0x10, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, + 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x34, 0x0a, 0x15, 0x72, 0x65, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x74, + 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x49, 0x44, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x15, 0x72, 0x65, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, + 0x70, 0x61, 0x6e, 0x74, 0x73, 0x49, 0x44, 0x22, 0x4b, 0x0a, 0x09, 0x45, 0x6d, 0x6f, 0x6a, 0x69, + 0x4d, 0x65, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x0d, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x4d, 0x65, 0x74, + 0x61, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x72, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x6d, 0x6f, 0x6a, 0x69, 0x4d, 0x65, 0x74, + 0x61, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x4d, 0x65, 0x74, 0x61, + 0x44, 0x61, 0x74, 0x61, 0x22, 0x49, 0x0a, 0x0d, 0x45, 0x6d, 0x6f, 0x6a, 0x69, 0x4d, 0x65, 0x74, + 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x55, 0x6e, + 0x69, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x65, 0x6d, 0x6f, + 0x6a, 0x69, 0x55, 0x6e, 0x69, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2a, + 0x3c, 0x0a, 0x08, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, + 0x41, 0x44, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x10, 0x03, 0x2a, 0xc5, 0x01, + 0x0a, 0x06, 0x45, 0x6d, 0x6f, 0x6a, 0x69, 0x73, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x45, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x49, 0x4b, 0x45, 0x10, + 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x56, 0x45, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x4c, + 0x41, 0x55, 0x47, 0x48, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x52, 0x50, 0x52, 0x49, + 0x53, 0x45, 0x44, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x41, 0x44, 0x10, 0x05, 0x12, 0x09, + 0x0a, 0x05, 0x41, 0x4e, 0x47, 0x52, 0x59, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x49, 0x53, + 0x4c, 0x49, 0x4b, 0x45, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, + 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x51, 0x55, 0x45, 0x53, 0x54, 0x49, 0x4f, 0x4e, 0x49, 0x4e, + 0x47, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x52, 0x59, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x41, + 0x43, 0x45, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x4f, 0x55, 0x54, 0x49, 0x4e, 0x47, 0x5f, + 0x46, 0x41, 0x43, 0x45, 0x10, 0x0b, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x44, 0x5f, 0x48, 0x45, + 0x41, 0x52, 0x54, 0x10, 0x0c, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, + 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_reactions_proto_rawDescOnce sync.Once + file_reactions_proto_rawDescData = file_reactions_proto_rawDesc +) + +func file_reactions_proto_rawDescGZIP() []byte { + file_reactions_proto_rawDescOnce.Do(func() { + file_reactions_proto_rawDescData = protoimpl.X.CompressGZIP(file_reactions_proto_rawDescData) + }) + return file_reactions_proto_rawDescData +} + +var file_reactions_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_reactions_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_reactions_proto_goTypes = []interface{}{ + (Reaction)(0), // 0: reactions.Reaction + (Emojis)(0), // 1: reactions.Emojis + (*SendReactionPayload)(nil), // 2: reactions.SendReactionPayload + (*SendReactionResponse)(nil), // 3: reactions.SendReactionResponse + (*ReactionData)(nil), // 4: reactions.ReactionData + (*ReactionResponse)(nil), // 5: reactions.ReactionResponse + (*EmojiMeta)(nil), // 6: reactions.EmojiMeta + (*EmojiMetaData)(nil), // 7: reactions.EmojiMetaData +} +var file_reactions_proto_depIdxs = []int32{ + 4, // 0: reactions.SendReactionPayload.reactionData:type_name -> reactions.ReactionData + 0, // 1: reactions.SendReactionPayload.action:type_name -> reactions.Reaction + 4, // 2: reactions.ReactionResponse.data:type_name -> reactions.ReactionData + 7, // 3: reactions.EmojiMeta.emojiMetaData:type_name -> reactions.EmojiMetaData + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_reactions_proto_init() } +func file_reactions_proto_init() { + if File_reactions_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_reactions_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendReactionPayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_reactions_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendReactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_reactions_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReactionData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_reactions_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_reactions_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmojiMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_reactions_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmojiMetaData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_reactions_proto_rawDesc, + NumEnums: 2, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_reactions_proto_goTypes, + DependencyIndexes: file_reactions_proto_depIdxs, + EnumInfos: file_reactions_proto_enumTypes, + MessageInfos: file_reactions_proto_msgTypes, + }.Build() + File_reactions_proto = out.File + file_reactions_proto_rawDesc = nil + file_reactions_proto_goTypes = nil + file_reactions_proto_depIdxs = nil +} diff --git a/libgm/binary/relay.pb.go b/libgm/binary/relay.pb.go deleted file mode 100644 index 4e02a52..0000000 --- a/libgm/binary/relay.pb.go +++ /dev/null @@ -1,576 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc v3.21.12 -// source: relay.proto - -package binary - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -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) -) - -type RegisterPhoneRelayResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Field1 *Message1 `protobuf:"bytes,1,opt,name=field1,proto3" json:"field1,omitempty"` - Field2 *Message2 `protobuf:"bytes,2,opt,name=field2,proto3" json:"field2,omitempty"` - PairingKey []byte `protobuf:"bytes,3,opt,name=pairingKey,proto3" json:"pairingKey,omitempty"` - Field4 int64 `protobuf:"varint,4,opt,name=field4,proto3" json:"field4,omitempty"` - Field5 *Message3 `protobuf:"bytes,5,opt,name=field5,proto3" json:"field5,omitempty"` - Field6 []byte `protobuf:"bytes,6,opt,name=field6,proto3" json:"field6,omitempty"` -} - -func (x *RegisterPhoneRelayResponse) Reset() { - *x = RegisterPhoneRelayResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relay_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterPhoneRelayResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterPhoneRelayResponse) ProtoMessage() {} - -func (x *RegisterPhoneRelayResponse) ProtoReflect() protoreflect.Message { - mi := &file_relay_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterPhoneRelayResponse.ProtoReflect.Descriptor instead. -func (*RegisterPhoneRelayResponse) Descriptor() ([]byte, []int) { - return file_relay_proto_rawDescGZIP(), []int{0} -} - -func (x *RegisterPhoneRelayResponse) GetField1() *Message1 { - if x != nil { - return x.Field1 - } - return nil -} - -func (x *RegisterPhoneRelayResponse) GetField2() *Message2 { - if x != nil { - return x.Field2 - } - return nil -} - -func (x *RegisterPhoneRelayResponse) GetPairingKey() []byte { - if x != nil { - return x.PairingKey - } - return nil -} - -func (x *RegisterPhoneRelayResponse) GetField4() int64 { - if x != nil { - return x.Field4 - } - return 0 -} - -func (x *RegisterPhoneRelayResponse) GetField5() *Message3 { - if x != nil { - return x.Field5 - } - return nil -} - -func (x *RegisterPhoneRelayResponse) GetField6() []byte { - if x != nil { - return x.Field6 - } - return nil -} - -type Message1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PubKey int64 `protobuf:"varint,2,opt,name=pubKey,proto3" json:"pubKey,omitempty"` -} - -func (x *Message1) Reset() { - *x = Message1{} - if protoimpl.UnsafeEnabled { - mi := &file_relay_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Message1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Message1) ProtoMessage() {} - -func (x *Message1) ProtoReflect() protoreflect.Message { - mi := &file_relay_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Message1.ProtoReflect.Descriptor instead. -func (*Message1) Descriptor() ([]byte, []int) { - return file_relay_proto_rawDescGZIP(), []int{1} -} - -func (x *Message1) GetPubKey() int64 { - if x != nil { - return x.PubKey - } - return 0 -} - -type Message2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Field1 int64 `protobuf:"varint,1,opt,name=field1,proto3" json:"field1,omitempty"` - Field2 []byte `protobuf:"bytes,2,opt,name=field2,proto3" json:"field2,omitempty"` - Field3 string `protobuf:"bytes,3,opt,name=field3,proto3" json:"field3,omitempty"` -} - -func (x *Message2) Reset() { - *x = Message2{} - if protoimpl.UnsafeEnabled { - mi := &file_relay_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Message2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Message2) ProtoMessage() {} - -func (x *Message2) ProtoReflect() protoreflect.Message { - mi := &file_relay_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Message2.ProtoReflect.Descriptor instead. -func (*Message2) Descriptor() ([]byte, []int) { - return file_relay_proto_rawDescGZIP(), []int{2} -} - -func (x *Message2) GetField1() int64 { - if x != nil { - return x.Field1 - } - return 0 -} - -func (x *Message2) GetField2() []byte { - if x != nil { - return x.Field2 - } - return nil -} - -func (x *Message2) GetField3() string { - if x != nil { - return x.Field3 - } - return "" -} - -type Message3 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RpcKey []byte `protobuf:"bytes,1,opt,name=rpcKey,proto3" json:"rpcKey,omitempty"` - Field2 int64 `protobuf:"varint,2,opt,name=field2,proto3" json:"field2,omitempty"` -} - -func (x *Message3) Reset() { - *x = Message3{} - if protoimpl.UnsafeEnabled { - mi := &file_relay_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Message3) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Message3) ProtoMessage() {} - -func (x *Message3) ProtoReflect() protoreflect.Message { - mi := &file_relay_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Message3.ProtoReflect.Descriptor instead. -func (*Message3) Descriptor() ([]byte, []int) { - return file_relay_proto_rawDescGZIP(), []int{3} -} - -func (x *Message3) GetRpcKey() []byte { - if x != nil { - return x.RpcKey - } - return nil -} - -func (x *Message3) GetField2() int64 { - if x != nil { - return x.Field2 - } - return 0 -} - -type RefreshPhoneRelayResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Field1 *Message1 `protobuf:"bytes,1,opt,name=field1,proto3" json:"field1,omitempty"` - PairKey []byte `protobuf:"bytes,2,opt,name=pairKey,proto3" json:"pairKey,omitempty"` - ValidFor int64 `protobuf:"varint,3,opt,name=validFor,proto3" json:"validFor,omitempty"` -} - -func (x *RefreshPhoneRelayResponse) Reset() { - *x = RefreshPhoneRelayResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relay_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RefreshPhoneRelayResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RefreshPhoneRelayResponse) ProtoMessage() {} - -func (x *RefreshPhoneRelayResponse) ProtoReflect() protoreflect.Message { - mi := &file_relay_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RefreshPhoneRelayResponse.ProtoReflect.Descriptor instead. -func (*RefreshPhoneRelayResponse) Descriptor() ([]byte, []int) { - return file_relay_proto_rawDescGZIP(), []int{4} -} - -func (x *RefreshPhoneRelayResponse) GetField1() *Message1 { - if x != nil { - return x.Field1 - } - return nil -} - -func (x *RefreshPhoneRelayResponse) GetPairKey() []byte { - if x != nil { - return x.PairKey - } - return nil -} - -func (x *RefreshPhoneRelayResponse) GetValidFor() int64 { - if x != nil { - return x.ValidFor - } - return 0 -} - -type WebEncryptionKeyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Curve *Message1 `protobuf:"bytes,1,opt,name=curve,proto3" json:"curve,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *WebEncryptionKeyResponse) Reset() { - *x = WebEncryptionKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relay_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WebEncryptionKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WebEncryptionKeyResponse) ProtoMessage() {} - -func (x *WebEncryptionKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_relay_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WebEncryptionKeyResponse.ProtoReflect.Descriptor instead. -func (*WebEncryptionKeyResponse) Descriptor() ([]byte, []int) { - return file_relay_proto_rawDescGZIP(), []int{5} -} - -func (x *WebEncryptionKeyResponse) GetCurve() *Message1 { - if x != nil { - return x.Curve - } - return nil -} - -func (x *WebEncryptionKeyResponse) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -var File_relay_proto protoreflect.FileDescriptor - -var file_relay_proto_rawDesc = []byte{ - 0x0a, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x6c, 0x61, - 0x79, 0x22, 0x8e, 0x02, 0x0a, 0x1a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x68, - 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x34, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x68, 0x6f, 0x6e, 0x65, - 0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x52, 0x06, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x32, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x12, 0x1e, 0x0a, 0x0a, - 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0a, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x34, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x35, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, - 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x33, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x35, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x36, 0x22, 0x22, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x52, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x33, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x33, 0x22, 0x3a, 0x0a, 0x08, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x33, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x70, 0x63, 0x4b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x70, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x16, - 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x22, 0x87, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, - 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x31, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, - 0x69, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x69, - 0x72, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, - 0x22, 0x60, 0x0a, 0x18, 0x57, 0x65, 0x62, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x05, - 0x63, 0x75, 0x72, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, - 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x52, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, - 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_relay_proto_rawDescOnce sync.Once - file_relay_proto_rawDescData = file_relay_proto_rawDesc -) - -func file_relay_proto_rawDescGZIP() []byte { - file_relay_proto_rawDescOnce.Do(func() { - file_relay_proto_rawDescData = protoimpl.X.CompressGZIP(file_relay_proto_rawDescData) - }) - return file_relay_proto_rawDescData -} - -var file_relay_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_relay_proto_goTypes = []interface{}{ - (*RegisterPhoneRelayResponse)(nil), // 0: registerPhoneRelay.RegisterPhoneRelayResponse - (*Message1)(nil), // 1: registerPhoneRelay.Message1 - (*Message2)(nil), // 2: registerPhoneRelay.Message2 - (*Message3)(nil), // 3: registerPhoneRelay.Message3 - (*RefreshPhoneRelayResponse)(nil), // 4: registerPhoneRelay.RefreshPhoneRelayResponse - (*WebEncryptionKeyResponse)(nil), // 5: registerPhoneRelay.WebEncryptionKeyResponse -} -var file_relay_proto_depIdxs = []int32{ - 1, // 0: registerPhoneRelay.RegisterPhoneRelayResponse.field1:type_name -> registerPhoneRelay.Message1 - 2, // 1: registerPhoneRelay.RegisterPhoneRelayResponse.field2:type_name -> registerPhoneRelay.Message2 - 3, // 2: registerPhoneRelay.RegisterPhoneRelayResponse.field5:type_name -> registerPhoneRelay.Message3 - 1, // 3: registerPhoneRelay.RefreshPhoneRelayResponse.field1:type_name -> registerPhoneRelay.Message1 - 1, // 4: registerPhoneRelay.WebEncryptionKeyResponse.curve:type_name -> registerPhoneRelay.Message1 - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_relay_proto_init() } -func file_relay_proto_init() { - if File_relay_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_relay_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterPhoneRelayResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relay_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relay_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relay_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relay_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefreshPhoneRelayResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relay_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebEncryptionKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_relay_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_relay_proto_goTypes, - DependencyIndexes: file_relay_proto_depIdxs, - MessageInfos: file_relay_proto_msgTypes, - }.Build() - File_relay_proto = out.File - file_relay_proto_rawDesc = nil - file_relay_proto_goTypes = nil - file_relay_proto_depIdxs = nil -} diff --git a/libgm/binary/responses.pb.go b/libgm/binary/responses.pb.go index 3d5d581..4bf78ed 100644 --- a/libgm/binary/responses.pb.go +++ b/libgm/binary/responses.pb.go @@ -20,16 +20,59 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type PrepareNewSession struct { +type ConversationType int32 + +const ( + ConversationType_UNKNOWN_CONVERSATION_TYPE ConversationType = 0 +) + +// Enum value maps for ConversationType. +var ( + ConversationType_name = map[int32]string{ + 0: "UNKNOWN_CONVERSATION_TYPE", + } + ConversationType_value = map[string]int32{ + "UNKNOWN_CONVERSATION_TYPE": 0, + } +) + +func (x ConversationType) Enum() *ConversationType { + p := new(ConversationType) + *p = x + return p +} + +func (x ConversationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConversationType) Descriptor() protoreflect.EnumDescriptor { + return file_responses_proto_enumTypes[0].Descriptor() +} + +func (ConversationType) Type() protoreflect.EnumType { + return &file_responses_proto_enumTypes[0] +} + +func (x ConversationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConversationType.Descriptor instead. +func (ConversationType) EnumDescriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{0} +} + +type RegisterRefreshResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + TokenData *RefreshAuthData `protobuf:"bytes,2,opt,name=tokenData,proto3" json:"tokenData,omitempty"` } -func (x *PrepareNewSession) Reset() { - *x = PrepareNewSession{} +func (x *RegisterRefreshResponse) Reset() { + *x = RegisterRefreshResponse{} if protoimpl.UnsafeEnabled { mi := &file_responses_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -37,13 +80,13 @@ func (x *PrepareNewSession) Reset() { } } -func (x *PrepareNewSession) String() string { +func (x *RegisterRefreshResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PrepareNewSession) ProtoMessage() {} +func (*RegisterRefreshResponse) ProtoMessage() {} -func (x *PrepareNewSession) ProtoReflect() protoreflect.Message { +func (x *RegisterRefreshResponse) ProtoReflect() protoreflect.Message { mi := &file_responses_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -55,28 +98,29 @@ func (x *PrepareNewSession) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PrepareNewSession.ProtoReflect.Descriptor instead. -func (*PrepareNewSession) Descriptor() ([]byte, []int) { +// Deprecated: Use RegisterRefreshResponse.ProtoReflect.Descriptor instead. +func (*RegisterRefreshResponse) Descriptor() ([]byte, []int) { return file_responses_proto_rawDescGZIP(), []int{0} } -func (x *PrepareNewSession) GetSuccess() bool { +func (x *RegisterRefreshResponse) GetTokenData() *RefreshAuthData { if x != nil { - return x.Success + return x.TokenData } - return false + return nil } -type NewSession struct { +type RefreshAuthData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Settings *Settings `protobuf:"bytes,5,opt,name=settings,proto3" json:"settings,omitempty"` + TachyonAuthToken []byte `protobuf:"bytes,1,opt,name=tachyonAuthToken,proto3" json:"tachyonAuthToken,omitempty"` + ValidFor string `protobuf:"bytes,2,opt,name=validFor,proto3" json:"validFor,omitempty"` } -func (x *NewSession) Reset() { - *x = NewSession{} +func (x *RefreshAuthData) Reset() { + *x = RefreshAuthData{} if protoimpl.UnsafeEnabled { mi := &file_responses_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -84,13 +128,13 @@ func (x *NewSession) Reset() { } } -func (x *NewSession) String() string { +func (x *RefreshAuthData) String() string { return protoimpl.X.MessageStringOf(x) } -func (*NewSession) ProtoMessage() {} +func (*RefreshAuthData) ProtoMessage() {} -func (x *NewSession) ProtoReflect() protoreflect.Message { +func (x *RefreshAuthData) ProtoReflect() protoreflect.Message { mi := &file_responses_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -102,14 +146,389 @@ func (x *NewSession) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use NewSession.ProtoReflect.Descriptor instead. -func (*NewSession) Descriptor() ([]byte, []int) { +// Deprecated: Use RefreshAuthData.ProtoReflect.Descriptor instead. +func (*RefreshAuthData) Descriptor() ([]byte, []int) { return file_responses_proto_rawDescGZIP(), []int{1} } -func (x *NewSession) GetSettings() *Settings { +func (x *RefreshAuthData) GetTachyonAuthToken() []byte { if x != nil { - return x.Settings + return x.TachyonAuthToken + } + return nil +} + +func (x *RefreshAuthData) GetValidFor() string { + if x != nil { + return x.ValidFor + } + return "" +} + +type FetchMessagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` + SomeBytes []byte `protobuf:"bytes,3,opt,name=someBytes,proto3" json:"someBytes,omitempty"` + TotalMessages int64 `protobuf:"varint,4,opt,name=totalMessages,proto3" json:"totalMessages,omitempty"` + Cursor *Cursor `protobuf:"bytes,5,opt,name=cursor,proto3" json:"cursor,omitempty"` +} + +func (x *FetchMessagesResponse) Reset() { + *x = FetchMessagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_responses_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchMessagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchMessagesResponse) ProtoMessage() {} + +func (x *FetchMessagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_responses_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchMessagesResponse.ProtoReflect.Descriptor instead. +func (*FetchMessagesResponse) Descriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{2} +} + +func (x *FetchMessagesResponse) GetMessages() []*Message { + if x != nil { + return x.Messages + } + return nil +} + +func (x *FetchMessagesResponse) GetSomeBytes() []byte { + if x != nil { + return x.SomeBytes + } + return nil +} + +func (x *FetchMessagesResponse) GetTotalMessages() int64 { + if x != nil { + return x.TotalMessages + } + return 0 +} + +func (x *FetchMessagesResponse) GetCursor() *Cursor { + if x != nil { + return x.Cursor + } + return nil +} + +type DeleteMessageResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *DeleteMessageResponse) Reset() { + *x = DeleteMessageResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_responses_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteMessageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMessageResponse) ProtoMessage() {} + +func (x *DeleteMessageResponse) ProtoReflect() protoreflect.Message { + mi := &file_responses_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMessageResponse.ProtoReflect.Descriptor instead. +func (*DeleteMessageResponse) Descriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteMessageResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type UpdateConversationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *UpdateConversationResponse) Reset() { + *x = UpdateConversationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_responses_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateConversationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateConversationResponse) ProtoMessage() {} + +func (x *UpdateConversationResponse) ProtoReflect() protoreflect.Message { + mi := &file_responses_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateConversationResponse.ProtoReflect.Descriptor instead. +func (*UpdateConversationResponse) Descriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateConversationResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type GetConversationTypeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID,omitempty"` + Type int32 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"` + Bool1 bool `protobuf:"varint,5,opt,name=bool1,proto3" json:"bool1,omitempty"` + Number2 int32 `protobuf:"varint,6,opt,name=number2,proto3" json:"number2,omitempty"` +} + +func (x *GetConversationTypeResponse) Reset() { + *x = GetConversationTypeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_responses_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConversationTypeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConversationTypeResponse) ProtoMessage() {} + +func (x *GetConversationTypeResponse) ProtoReflect() protoreflect.Message { + mi := &file_responses_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConversationTypeResponse.ProtoReflect.Descriptor instead. +func (*GetConversationTypeResponse) Descriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{5} +} + +func (x *GetConversationTypeResponse) GetConversationID() string { + if x != nil { + return x.ConversationID + } + return "" +} + +func (x *GetConversationTypeResponse) GetType() int32 { + if x != nil { + return x.Type + } + return 0 +} + +func (x *GetConversationTypeResponse) GetBool1() bool { + if x != nil { + return x.Bool1 + } + return false +} + +func (x *GetConversationTypeResponse) GetNumber2() int32 { + if x != nil { + return x.Number2 + } + return 0 +} + +type NotifyDittoActivityResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *NotifyDittoActivityResponse) Reset() { + *x = NotifyDittoActivityResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_responses_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NotifyDittoActivityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotifyDittoActivityResponse) ProtoMessage() {} + +func (x *NotifyDittoActivityResponse) ProtoReflect() protoreflect.Message { + mi := &file_responses_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotifyDittoActivityResponse.ProtoReflect.Descriptor instead. +func (*NotifyDittoActivityResponse) Descriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{6} +} + +type IsBugleDefaultResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *IsBugleDefaultResponse) Reset() { + *x = IsBugleDefaultResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_responses_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsBugleDefaultResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsBugleDefaultResponse) ProtoMessage() {} + +func (x *IsBugleDefaultResponse) ProtoReflect() protoreflect.Message { + mi := &file_responses_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsBugleDefaultResponse.ProtoReflect.Descriptor instead. +func (*IsBugleDefaultResponse) Descriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{7} +} + +func (x *IsBugleDefaultResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type GetUpdatesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *UserAlertEvent `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *GetUpdatesResponse) Reset() { + *x = GetUpdatesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_responses_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUpdatesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUpdatesResponse) ProtoMessage() {} + +func (x *GetUpdatesResponse) ProtoReflect() protoreflect.Message { + mi := &file_responses_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUpdatesResponse.ProtoReflect.Descriptor instead. +func (*GetUpdatesResponse) Descriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{8} +} + +func (x *GetUpdatesResponse) GetData() *UserAlertEvent { + if x != nil { + return x.Data } return nil } @@ -119,13 +538,13 @@ type SendMessageResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type MessageType `protobuf:"varint,3,opt,name=type,proto3,enum=conversations.MessageType" json:"type,omitempty"` + Type int64 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"` } func (x *SendMessageResponse) Reset() { *x = SendMessageResponse{} if protoimpl.UnsafeEnabled { - mi := &file_responses_proto_msgTypes[2] + mi := &file_responses_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -138,7 +557,7 @@ func (x *SendMessageResponse) String() string { func (*SendMessageResponse) ProtoMessage() {} func (x *SendMessageResponse) ProtoReflect() protoreflect.Message { - mi := &file_responses_proto_msgTypes[2] + mi := &file_responses_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -151,36 +570,429 @@ func (x *SendMessageResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SendMessageResponse.ProtoReflect.Descriptor instead. func (*SendMessageResponse) Descriptor() ([]byte, []int) { - return file_responses_proto_rawDescGZIP(), []int{2} + return file_responses_proto_rawDescGZIP(), []int{9} } -func (x *SendMessageResponse) GetType() MessageType { +func (x *SendMessageResponse) GetType() int64 { if x != nil { return x.Type } - return MessageType_UNKNOWN + return 0 +} + +type RefreshPhoneRelayResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Coordinates *CoordinateMessage `protobuf:"bytes,1,opt,name=coordinates,proto3" json:"coordinates,omitempty"` + PairKey []byte `protobuf:"bytes,2,opt,name=pairKey,proto3" json:"pairKey,omitempty"` + ValidFor int64 `protobuf:"varint,3,opt,name=validFor,proto3" json:"validFor,omitempty"` +} + +func (x *RefreshPhoneRelayResponse) Reset() { + *x = RefreshPhoneRelayResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_responses_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefreshPhoneRelayResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshPhoneRelayResponse) ProtoMessage() {} + +func (x *RefreshPhoneRelayResponse) ProtoReflect() protoreflect.Message { + mi := &file_responses_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshPhoneRelayResponse.ProtoReflect.Descriptor instead. +func (*RefreshPhoneRelayResponse) Descriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{10} +} + +func (x *RefreshPhoneRelayResponse) GetCoordinates() *CoordinateMessage { + if x != nil { + return x.Coordinates + } + return nil +} + +func (x *RefreshPhoneRelayResponse) GetPairKey() []byte { + if x != nil { + return x.PairKey + } + return nil +} + +func (x *RefreshPhoneRelayResponse) GetValidFor() int64 { + if x != nil { + return x.ValidFor + } + return 0 +} + +type WebEncryptionKeyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Coordinates *CoordinateMessage `protobuf:"bytes,1,opt,name=coordinates,proto3" json:"coordinates,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *WebEncryptionKeyResponse) Reset() { + *x = WebEncryptionKeyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_responses_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebEncryptionKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebEncryptionKeyResponse) ProtoMessage() {} + +func (x *WebEncryptionKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_responses_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebEncryptionKeyResponse.ProtoReflect.Descriptor instead. +func (*WebEncryptionKeyResponse) Descriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{11} +} + +func (x *WebEncryptionKeyResponse) GetCoordinates() *CoordinateMessage { + if x != nil { + return x.Coordinates + } + return nil +} + +func (x *WebEncryptionKeyResponse) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +type RegisterPhoneRelayResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Coordinates *CoordinateMessage `protobuf:"bytes,1,opt,name=coordinates,proto3" json:"coordinates,omitempty"` + Browser *Device `protobuf:"bytes,2,opt,name=browser,proto3" json:"browser,omitempty"` + PairingKey []byte `protobuf:"bytes,3,opt,name=pairingKey,proto3" json:"pairingKey,omitempty"` + ValidFor int64 `protobuf:"varint,4,opt,name=validFor,proto3" json:"validFor,omitempty"` + AuthKeyData *AuthKeyData `protobuf:"bytes,5,opt,name=authKeyData,proto3" json:"authKeyData,omitempty"` + ResponseID string `protobuf:"bytes,6,opt,name=responseID,proto3" json:"responseID,omitempty"` +} + +func (x *RegisterPhoneRelayResponse) Reset() { + *x = RegisterPhoneRelayResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_responses_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterPhoneRelayResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterPhoneRelayResponse) ProtoMessage() {} + +func (x *RegisterPhoneRelayResponse) ProtoReflect() protoreflect.Message { + mi := &file_responses_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterPhoneRelayResponse.ProtoReflect.Descriptor instead. +func (*RegisterPhoneRelayResponse) Descriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{12} +} + +func (x *RegisterPhoneRelayResponse) GetCoordinates() *CoordinateMessage { + if x != nil { + return x.Coordinates + } + return nil +} + +func (x *RegisterPhoneRelayResponse) GetBrowser() *Device { + if x != nil { + return x.Browser + } + return nil +} + +func (x *RegisterPhoneRelayResponse) GetPairingKey() []byte { + if x != nil { + return x.PairingKey + } + return nil +} + +func (x *RegisterPhoneRelayResponse) GetValidFor() int64 { + if x != nil { + return x.ValidFor + } + return 0 +} + +func (x *RegisterPhoneRelayResponse) GetAuthKeyData() *AuthKeyData { + if x != nil { + return x.AuthKeyData + } + return nil +} + +func (x *RegisterPhoneRelayResponse) GetResponseID() string { + if x != nil { + return x.ResponseID + } + return "" +} + +type CoordinateMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Coord1 int64 `protobuf:"varint,2,opt,name=coord1,proto3" json:"coord1,omitempty"` +} + +func (x *CoordinateMessage) Reset() { + *x = CoordinateMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_responses_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CoordinateMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CoordinateMessage) ProtoMessage() {} + +func (x *CoordinateMessage) ProtoReflect() protoreflect.Message { + mi := &file_responses_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CoordinateMessage.ProtoReflect.Descriptor instead. +func (*CoordinateMessage) Descriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{13} +} + +func (x *CoordinateMessage) GetCoord1() int64 { + if x != nil { + return x.Coord1 + } + return 0 +} + +type AuthKeyData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TachyonAuthToken []byte `protobuf:"bytes,1,opt,name=tachyonAuthToken,proto3" json:"tachyonAuthToken,omitempty"` + ValidFor int64 `protobuf:"varint,2,opt,name=validFor,proto3" json:"validFor,omitempty"` +} + +func (x *AuthKeyData) Reset() { + *x = AuthKeyData{} + if protoimpl.UnsafeEnabled { + mi := &file_responses_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthKeyData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthKeyData) ProtoMessage() {} + +func (x *AuthKeyData) ProtoReflect() protoreflect.Message { + mi := &file_responses_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthKeyData.ProtoReflect.Descriptor instead. +func (*AuthKeyData) Descriptor() ([]byte, []int) { + return file_responses_proto_rawDescGZIP(), []int{14} +} + +func (x *AuthKeyData) GetTachyonAuthToken() []byte { + if x != nil { + return x.TachyonAuthToken + } + return nil +} + +func (x *AuthKeyData) GetValidFor() int64 { + if x != nil { + return x.ValidFor + } + return 0 } var File_responses_proto protoreflect.FileDescriptor var file_responses_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x1a, 0x0e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x2d, 0x0a, 0x11, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x4e, 0x65, 0x77, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x22, 0x3c, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, - 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x45, - 0x0a, 0x13, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, - 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x12, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x1a, 0x0c, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x53, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x41, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x22, 0x59, 0x0a, 0x0f, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x41, + 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x61, 0x63, 0x68, 0x79, + 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x10, 0x74, 0x61, 0x63, 0x68, 0x79, 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, 0x22, + 0xbe, 0x01, 0x0a, 0x15, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x6f, 0x6d, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x09, 0x73, 0x6f, 0x6d, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x22, 0x31, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x22, 0x36, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x1b, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x12, 0x18, 0x0a, + 0x07, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x32, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x32, 0x22, 0x1d, 0x0a, 0x1b, 0x4e, 0x6f, 0x74, 0x69, 0x66, + 0x79, 0x44, 0x69, 0x74, 0x74, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x16, 0x49, 0x73, 0x42, 0x75, 0x67, 0x6c, + 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x40, 0x0a, 0x12, 0x47, 0x65, + 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x6c, 0x65, 0x72, + 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x29, 0x0a, 0x13, + 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, + 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x69, 0x72, 0x4b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x69, 0x72, 0x4b, 0x65, 0x79, 0x12, + 0x1a, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, 0x22, 0x6c, 0x0a, 0x18, 0x57, + 0x65, 0x62, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x6f, 0x6f, 0x72, 0x64, + 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6f, 0x72, + 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x9e, 0x02, 0x0a, 0x1a, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x6f, 0x6f, 0x72, + 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6f, + 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x62, 0x72, 0x6f, 0x77, + 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x62, 0x72, 0x6f, + 0x77, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x4b, + 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, + 0x67, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, + 0x12, 0x38, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x44, 0x61, 0x74, 0x61, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x61, + 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x44, 0x22, 0x2b, 0x0a, 0x11, 0x43, 0x6f, + 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x31, 0x22, 0x55, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x4b, + 0x65, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x61, 0x63, 0x68, 0x79, 0x6f, + 0x6e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x10, 0x74, 0x61, 0x63, 0x68, 0x79, 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, 0x2a, 0x31, + 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x43, 0x4f, + 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, + 0x00, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, + 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -195,22 +1007,45 @@ func file_responses_proto_rawDescGZIP() []byte { return file_responses_proto_rawDescData } -var file_responses_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_responses_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_responses_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_responses_proto_goTypes = []interface{}{ - (*PrepareNewSession)(nil), // 0: responses.PrepareNewSession - (*NewSession)(nil), // 1: responses.NewSession - (*SendMessageResponse)(nil), // 2: responses.SendMessageResponse - (*Settings)(nil), // 3: settings.Settings - (MessageType)(0), // 4: conversations.MessageType + (ConversationType)(0), // 0: responses.ConversationType + (*RegisterRefreshResponse)(nil), // 1: responses.RegisterRefreshResponse + (*RefreshAuthData)(nil), // 2: responses.RefreshAuthData + (*FetchMessagesResponse)(nil), // 3: responses.FetchMessagesResponse + (*DeleteMessageResponse)(nil), // 4: responses.DeleteMessageResponse + (*UpdateConversationResponse)(nil), // 5: responses.UpdateConversationResponse + (*GetConversationTypeResponse)(nil), // 6: responses.GetConversationTypeResponse + (*NotifyDittoActivityResponse)(nil), // 7: responses.NotifyDittoActivityResponse + (*IsBugleDefaultResponse)(nil), // 8: responses.IsBugleDefaultResponse + (*GetUpdatesResponse)(nil), // 9: responses.GetUpdatesResponse + (*SendMessageResponse)(nil), // 10: responses.SendMessageResponse + (*RefreshPhoneRelayResponse)(nil), // 11: responses.RefreshPhoneRelayResponse + (*WebEncryptionKeyResponse)(nil), // 12: responses.WebEncryptionKeyResponse + (*RegisterPhoneRelayResponse)(nil), // 13: responses.RegisterPhoneRelayResponse + (*CoordinateMessage)(nil), // 14: responses.CoordinateMessage + (*AuthKeyData)(nil), // 15: responses.AuthKeyData + (*Message)(nil), // 16: conversations.Message + (*Cursor)(nil), // 17: conversations.Cursor + (*UserAlertEvent)(nil), // 18: events.UserAlertEvent + (*Device)(nil), // 19: messages.Device } var file_responses_proto_depIdxs = []int32{ - 3, // 0: responses.NewSession.settings:type_name -> settings.Settings - 4, // 1: responses.SendMessageResponse.type:type_name -> conversations.MessageType - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 2, // 0: responses.RegisterRefreshResponse.tokenData:type_name -> responses.RefreshAuthData + 16, // 1: responses.FetchMessagesResponse.messages:type_name -> conversations.Message + 17, // 2: responses.FetchMessagesResponse.cursor:type_name -> conversations.Cursor + 18, // 3: responses.GetUpdatesResponse.data:type_name -> events.UserAlertEvent + 14, // 4: responses.RefreshPhoneRelayResponse.coordinates:type_name -> responses.CoordinateMessage + 14, // 5: responses.WebEncryptionKeyResponse.coordinates:type_name -> responses.CoordinateMessage + 14, // 6: responses.RegisterPhoneRelayResponse.coordinates:type_name -> responses.CoordinateMessage + 19, // 7: responses.RegisterPhoneRelayResponse.browser:type_name -> messages.Device + 15, // 8: responses.RegisterPhoneRelayResponse.authKeyData:type_name -> responses.AuthKeyData + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_responses_proto_init() } @@ -218,11 +1053,12 @@ func file_responses_proto_init() { if File_responses_proto != nil { return } - file_settings_proto_init() + file_events_proto_init() + file_messages_proto_init() file_conversations_proto_init() if !protoimpl.UnsafeEnabled { file_responses_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrepareNewSession); i { + switch v := v.(*RegisterRefreshResponse); i { case 0: return &v.state case 1: @@ -234,7 +1070,7 @@ func file_responses_proto_init() { } } file_responses_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NewSession); i { + switch v := v.(*RefreshAuthData); i { case 0: return &v.state case 1: @@ -246,6 +1082,90 @@ func file_responses_proto_init() { } } file_responses_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchMessagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_responses_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteMessageResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_responses_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateConversationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_responses_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetConversationTypeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_responses_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NotifyDittoActivityResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_responses_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsBugleDefaultResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_responses_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUpdatesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_responses_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SendMessageResponse); i { case 0: return &v.state @@ -257,19 +1177,80 @@ func file_responses_proto_init() { return nil } } + file_responses_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshPhoneRelayResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_responses_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebEncryptionKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_responses_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterPhoneRelayResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_responses_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CoordinateMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_responses_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AuthKeyData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_responses_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, + NumEnums: 1, + NumMessages: 15, NumExtensions: 0, NumServices: 0, }, GoTypes: file_responses_proto_goTypes, DependencyIndexes: file_responses_proto_depIdxs, + EnumInfos: file_responses_proto_enumTypes, MessageInfos: file_responses_proto_msgTypes, }.Build() File_responses_proto = out.File diff --git a/libgm/binary/settings.pb.go b/libgm/binary/settings.pb.go index bc6804b..55a6dc8 100644 --- a/libgm/binary/settings.pb.go +++ b/libgm/binary/settings.pb.go @@ -25,14 +25,14 @@ type Settings struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - OpCodeData *OpCodeData `protobuf:"bytes,3,opt,name=opCodeData,proto3" json:"opCodeData,omitempty"` - BoolFields *BooleanFields `protobuf:"bytes,4,opt,name=boolFields,proto3" json:"boolFields,omitempty"` - Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` - Bool1 bool `protobuf:"varint,7,opt,name=bool1,proto3" json:"bool1,omitempty"` - BoolFields2 *BooleanFields2 `protobuf:"bytes,8,opt,name=boolFields2,proto3" json:"boolFields2,omitempty"` - EmptyString string `protobuf:"bytes,9,opt,name=emptyString,proto3" json:"emptyString,omitempty"` - BoolFields3 *BooleanFields3 `protobuf:"bytes,10,opt,name=boolFields3,proto3" json:"boolFields3,omitempty"` + Data *Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + OpCodeData *SomeData `protobuf:"bytes,3,opt,name=opCodeData,proto3" json:"opCodeData,omitempty"` + RcsSettings *RCSSettings `protobuf:"bytes,4,opt,name=rcsSettings,proto3" json:"rcsSettings,omitempty"` + BugleVersion string `protobuf:"bytes,5,opt,name=bugleVersion,proto3" json:"bugleVersion,omitempty"` + Bool1 bool `protobuf:"varint,7,opt,name=bool1,proto3" json:"bool1,omitempty"` + BoolFields2 *BooleanFields2 `protobuf:"bytes,8,opt,name=boolFields2,proto3" json:"boolFields2,omitempty"` + EmptyString string `protobuf:"bytes,9,opt,name=emptyString,proto3" json:"emptyString,omitempty"` + BoolFields3 *BooleanFields3 `protobuf:"bytes,10,opt,name=boolFields3,proto3" json:"boolFields3,omitempty"` } func (x *Settings) Reset() { @@ -74,23 +74,23 @@ func (x *Settings) GetData() *Data { return nil } -func (x *Settings) GetOpCodeData() *OpCodeData { +func (x *Settings) GetOpCodeData() *SomeData { if x != nil { return x.OpCodeData } return nil } -func (x *Settings) GetBoolFields() *BooleanFields { +func (x *Settings) GetRcsSettings() *RCSSettings { if x != nil { - return x.BoolFields + return x.RcsSettings } return nil } -func (x *Settings) GetVersion() string { +func (x *Settings) GetBugleVersion() string { if x != nil { - return x.Version + return x.BugleVersion } return "" } @@ -128,10 +128,10 @@ type Data struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BoolMsg *BoolMsg `protobuf:"bytes,3,opt,name=boolMsg,proto3" json:"boolMsg,omitempty"` - SimData *SimData `protobuf:"bytes,5,opt,name=simData,proto3" json:"simData,omitempty"` - Bool1 bool `protobuf:"varint,6,opt,name=bool1,proto3" json:"bool1,omitempty"` - NoClue *NoClue `protobuf:"bytes,7,opt,name=noClue,proto3" json:"noClue,omitempty"` + RcsChats *RCSChats `protobuf:"bytes,3,opt,name=rcsChats,proto3" json:"rcsChats,omitempty"` + SimData *SimData `protobuf:"bytes,5,opt,name=simData,proto3" json:"simData,omitempty"` + Bool1 bool `protobuf:"varint,6,opt,name=bool1,proto3" json:"bool1,omitempty"` + NoClue *NoClue `protobuf:"bytes,7,opt,name=noClue,proto3" json:"noClue,omitempty"` } func (x *Data) Reset() { @@ -166,9 +166,9 @@ func (*Data) Descriptor() ([]byte, []int) { return file_settings_proto_rawDescGZIP(), []int{1} } -func (x *Data) GetBoolMsg() *BoolMsg { +func (x *Data) GetRcsChats() *RCSChats { if x != nil { - return x.BoolMsg + return x.RcsChats } return nil } @@ -194,6 +194,53 @@ func (x *Data) GetNoClue() *NoClue { return nil } +type RCSChats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (x *RCSChats) Reset() { + *x = RCSChats{} + if protoimpl.UnsafeEnabled { + mi := &file_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RCSChats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RCSChats) ProtoMessage() {} + +func (x *RCSChats) ProtoReflect() protoreflect.Message { + mi := &file_settings_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RCSChats.ProtoReflect.Descriptor instead. +func (*RCSChats) Descriptor() ([]byte, []int) { + return file_settings_proto_rawDescGZIP(), []int{2} +} + +func (x *RCSChats) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + type BoolMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -205,7 +252,7 @@ type BoolMsg struct { func (x *BoolMsg) Reset() { *x = BoolMsg{} if protoimpl.UnsafeEnabled { - mi := &file_settings_proto_msgTypes[2] + mi := &file_settings_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -218,7 +265,7 @@ func (x *BoolMsg) String() string { func (*BoolMsg) ProtoMessage() {} func (x *BoolMsg) ProtoReflect() protoreflect.Message { - mi := &file_settings_proto_msgTypes[2] + mi := &file_settings_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -231,7 +278,7 @@ func (x *BoolMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use BoolMsg.ProtoReflect.Descriptor instead. func (*BoolMsg) Descriptor() ([]byte, []int) { - return file_settings_proto_rawDescGZIP(), []int{2} + return file_settings_proto_rawDescGZIP(), []int{3} } func (x *BoolMsg) GetBool1() bool { @@ -256,7 +303,7 @@ type SimData struct { func (x *SimData) Reset() { *x = SimData{} if protoimpl.UnsafeEnabled { - mi := &file_settings_proto_msgTypes[3] + mi := &file_settings_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -269,7 +316,7 @@ func (x *SimData) String() string { func (*SimData) ProtoMessage() {} func (x *SimData) ProtoReflect() protoreflect.Message { - mi := &file_settings_proto_msgTypes[3] + mi := &file_settings_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -282,7 +329,7 @@ func (x *SimData) ProtoReflect() protoreflect.Message { // Deprecated: Use SimData.ProtoReflect.Descriptor instead. func (*SimData) Descriptor() ([]byte, []int) { - return file_settings_proto_rawDescGZIP(), []int{3} + return file_settings_proto_rawDescGZIP(), []int{4} } func (x *SimData) GetUnknownMessage() *UnknownMessage { @@ -332,7 +379,7 @@ type UnknownMessage struct { func (x *UnknownMessage) Reset() { *x = UnknownMessage{} if protoimpl.UnsafeEnabled { - mi := &file_settings_proto_msgTypes[4] + mi := &file_settings_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -345,7 +392,7 @@ func (x *UnknownMessage) String() string { func (*UnknownMessage) ProtoMessage() {} func (x *UnknownMessage) ProtoReflect() protoreflect.Message { - mi := &file_settings_proto_msgTypes[4] + mi := &file_settings_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -358,7 +405,7 @@ func (x *UnknownMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use UnknownMessage.ProtoReflect.Descriptor instead. func (*UnknownMessage) Descriptor() ([]byte, []int) { - return file_settings_proto_rawDescGZIP(), []int{4} + return file_settings_proto_rawDescGZIP(), []int{5} } func (x *UnknownMessage) GetInt1() int64 { @@ -386,7 +433,7 @@ type NoClue struct { func (x *NoClue) Reset() { *x = NoClue{} if protoimpl.UnsafeEnabled { - mi := &file_settings_proto_msgTypes[5] + mi := &file_settings_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -399,7 +446,7 @@ func (x *NoClue) String() string { func (*NoClue) ProtoMessage() {} func (x *NoClue) ProtoReflect() protoreflect.Message { - mi := &file_settings_proto_msgTypes[5] + mi := &file_settings_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -412,7 +459,7 @@ func (x *NoClue) ProtoReflect() protoreflect.Message { // Deprecated: Use NoClue.ProtoReflect.Descriptor instead. func (*NoClue) Descriptor() ([]byte, []int) { - return file_settings_proto_rawDescGZIP(), []int{5} + return file_settings_proto_rawDescGZIP(), []int{6} } func (x *NoClue) GetCount() string { @@ -422,74 +469,20 @@ func (x *NoClue) GetCount() string { return "" } -type OpCodeData struct { +type SomeData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Field7 bool `protobuf:"varint,7,opt,name=field7,proto3" json:"field7,omitempty"` - JsonData string `protobuf:"bytes,16,opt,name=jsonData,proto3" json:"jsonData,omitempty"` + Field7 bool `protobuf:"varint,7,opt,name=field7,proto3" json:"field7,omitempty"` + Field12 bool `protobuf:"varint,12,opt,name=field12,proto3" json:"field12,omitempty"` + SomeEmojis [][]byte `protobuf:"bytes,15,rep,name=someEmojis,proto3" json:"someEmojis,omitempty"` + JsonData string `protobuf:"bytes,16,opt,name=jsonData,proto3" json:"jsonData,omitempty"` + SomeString string `protobuf:"bytes,17,opt,name=someString,proto3" json:"someString,omitempty"` } -func (x *OpCodeData) Reset() { - *x = OpCodeData{} - if protoimpl.UnsafeEnabled { - mi := &file_settings_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OpCodeData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpCodeData) ProtoMessage() {} - -func (x *OpCodeData) ProtoReflect() protoreflect.Message { - mi := &file_settings_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpCodeData.ProtoReflect.Descriptor instead. -func (*OpCodeData) Descriptor() ([]byte, []int) { - return file_settings_proto_rawDescGZIP(), []int{6} -} - -func (x *OpCodeData) GetField7() bool { - if x != nil { - return x.Field7 - } - return false -} - -func (x *OpCodeData) GetJsonData() string { - if x != nil { - return x.JsonData - } - return "" -} - -type BooleanFields struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bool1 bool `protobuf:"varint,1,opt,name=bool1,proto3" json:"bool1,omitempty"` - Bool2 bool `protobuf:"varint,2,opt,name=bool2,proto3" json:"bool2,omitempty"` - Bool3 bool `protobuf:"varint,3,opt,name=bool3,proto3" json:"bool3,omitempty"` - Bool4 bool `protobuf:"varint,4,opt,name=bool4,proto3" json:"bool4,omitempty"` -} - -func (x *BooleanFields) Reset() { - *x = BooleanFields{} +func (x *SomeData) Reset() { + *x = SomeData{} if protoimpl.UnsafeEnabled { mi := &file_settings_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -497,13 +490,13 @@ func (x *BooleanFields) Reset() { } } -func (x *BooleanFields) String() string { +func (x *SomeData) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BooleanFields) ProtoMessage() {} +func (*SomeData) ProtoMessage() {} -func (x *BooleanFields) ProtoReflect() protoreflect.Message { +func (x *SomeData) ProtoReflect() protoreflect.Message { mi := &file_settings_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -515,33 +508,111 @@ func (x *BooleanFields) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BooleanFields.ProtoReflect.Descriptor instead. -func (*BooleanFields) Descriptor() ([]byte, []int) { +// Deprecated: Use SomeData.ProtoReflect.Descriptor instead. +func (*SomeData) Descriptor() ([]byte, []int) { return file_settings_proto_rawDescGZIP(), []int{7} } -func (x *BooleanFields) GetBool1() bool { +func (x *SomeData) GetField7() bool { if x != nil { - return x.Bool1 + return x.Field7 } return false } -func (x *BooleanFields) GetBool2() bool { +func (x *SomeData) GetField12() bool { if x != nil { - return x.Bool2 + return x.Field12 } return false } -func (x *BooleanFields) GetBool3() bool { +func (x *SomeData) GetSomeEmojis() [][]byte { if x != nil { - return x.Bool3 + return x.SomeEmojis + } + return nil +} + +func (x *SomeData) GetJsonData() string { + if x != nil { + return x.JsonData + } + return "" +} + +func (x *SomeData) GetSomeString() string { + if x != nil { + return x.SomeString + } + return "" +} + +type RCSSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsEnabled bool `protobuf:"varint,1,opt,name=isEnabled,proto3" json:"isEnabled,omitempty"` + SendReadReceipts bool `protobuf:"varint,2,opt,name=sendReadReceipts,proto3" json:"sendReadReceipts,omitempty"` + ShowTypingIndicators bool `protobuf:"varint,3,opt,name=showTypingIndicators,proto3" json:"showTypingIndicators,omitempty"` + Bool4 bool `protobuf:"varint,4,opt,name=bool4,proto3" json:"bool4,omitempty"` +} + +func (x *RCSSettings) Reset() { + *x = RCSSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_settings_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RCSSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RCSSettings) ProtoMessage() {} + +func (x *RCSSettings) ProtoReflect() protoreflect.Message { + mi := &file_settings_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RCSSettings.ProtoReflect.Descriptor instead. +func (*RCSSettings) Descriptor() ([]byte, []int) { + return file_settings_proto_rawDescGZIP(), []int{8} +} + +func (x *RCSSettings) GetIsEnabled() bool { + if x != nil { + return x.IsEnabled } return false } -func (x *BooleanFields) GetBool4() bool { +func (x *RCSSettings) GetSendReadReceipts() bool { + if x != nil { + return x.SendReadReceipts + } + return false +} + +func (x *RCSSettings) GetShowTypingIndicators() bool { + if x != nil { + return x.ShowTypingIndicators + } + return false +} + +func (x *RCSSettings) GetBool4() bool { if x != nil { return x.Bool4 } @@ -563,7 +634,7 @@ type BooleanFields2 struct { func (x *BooleanFields2) Reset() { *x = BooleanFields2{} if protoimpl.UnsafeEnabled { - mi := &file_settings_proto_msgTypes[8] + mi := &file_settings_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -576,7 +647,7 @@ func (x *BooleanFields2) String() string { func (*BooleanFields2) ProtoMessage() {} func (x *BooleanFields2) ProtoReflect() protoreflect.Message { - mi := &file_settings_proto_msgTypes[8] + mi := &file_settings_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -589,7 +660,7 @@ func (x *BooleanFields2) ProtoReflect() protoreflect.Message { // Deprecated: Use BooleanFields2.ProtoReflect.Descriptor instead. func (*BooleanFields2) Descriptor() ([]byte, []int) { - return file_settings_proto_rawDescGZIP(), []int{8} + return file_settings_proto_rawDescGZIP(), []int{9} } func (x *BooleanFields2) GetBool1() bool { @@ -645,7 +716,7 @@ type BooleanFields3 struct { func (x *BooleanFields3) Reset() { *x = BooleanFields3{} if protoimpl.UnsafeEnabled { - mi := &file_settings_proto_msgTypes[9] + mi := &file_settings_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -658,7 +729,7 @@ func (x *BooleanFields3) String() string { func (*BooleanFields3) ProtoMessage() {} func (x *BooleanFields3) ProtoReflect() protoreflect.Message { - mi := &file_settings_proto_msgTypes[9] + mi := &file_settings_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -671,7 +742,7 @@ func (x *BooleanFields3) ProtoReflect() protoreflect.Message { // Deprecated: Use BooleanFields3.ProtoReflect.Descriptor instead. func (*BooleanFields3) Descriptor() ([]byte, []int) { - return file_settings_proto_rawDescGZIP(), []int{9} + return file_settings_proto_rawDescGZIP(), []int{10} } func (x *BooleanFields3) GetBool1() bool { @@ -734,94 +805,107 @@ var File_settings_proto protoreflect.FileDescriptor var file_settings_proto_rawDesc = []byte{ 0x0a, 0x0e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xe7, 0x02, 0x0a, 0x08, 0x53, + 0x12, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xef, 0x02, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x0a, 0x6f, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x0a, 0x6f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4f, 0x70, 0x43, 0x6f, 0x64, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x6f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x37, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, 0x0a, - 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x12, 0x3a, 0x0a, 0x0b, 0x62, 0x6f, - 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, - 0x61, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x32, 0x52, 0x0b, 0x62, 0x6f, 0x6f, 0x6c, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x32, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6d, 0x70, - 0x74, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x3a, 0x0a, 0x0b, 0x62, 0x6f, 0x6f, 0x6c, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x33, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x33, 0x52, 0x0b, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x73, 0x33, 0x22, 0xa0, 0x01, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, - 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, - 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x2b, 0x0a, 0x07, 0x73, 0x69, - 0x6d, 0x44, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x53, 0x69, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, - 0x73, 0x69, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x12, 0x28, 0x0a, - 0x06, 0x6e, 0x6f, 0x43, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4e, 0x6f, 0x43, 0x6c, 0x75, 0x65, 0x52, - 0x06, 0x6e, 0x6f, 0x43, 0x6c, 0x75, 0x65, 0x22, 0x1f, 0x0a, 0x07, 0x42, 0x6f, 0x6f, 0x6c, 0x4d, - 0x73, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x22, 0xb1, 0x01, 0x0a, 0x07, 0x53, 0x69, 0x6d, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0e, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x12, 0x20, 0x0a, 0x0b, - 0x63, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x63, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x68, 0x65, 0x78, 0x48, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x68, 0x65, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x74, 0x31, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x69, 0x6e, 0x74, 0x31, 0x22, 0x38, 0x0a, 0x0e, - 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x69, 0x6e, 0x74, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x69, 0x6e, - 0x74, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x74, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x04, 0x69, 0x6e, 0x74, 0x32, 0x22, 0x1e, 0x0a, 0x06, 0x4e, 0x6f, 0x43, 0x6c, 0x75, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x40, 0x0a, 0x0a, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x0a, 0x6f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x37, 0x0a, 0x0b, 0x72, 0x63, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, + 0x52, 0x43, 0x53, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0b, 0x72, 0x63, 0x73, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x75, 0x67, 0x6c, + 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x62, 0x75, 0x67, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, + 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, + 0x6c, 0x31, 0x12, 0x3a, 0x0a, 0x0b, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x32, 0x52, 0x0b, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x32, 0x12, 0x20, + 0x0a, 0x0b, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x12, 0x3a, 0x0a, 0x0b, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x33, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x33, 0x52, + 0x0b, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x33, 0x22, 0xa3, 0x01, 0x0a, + 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x08, 0x72, 0x63, 0x73, 0x43, 0x68, 0x61, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x2e, 0x52, 0x43, 0x53, 0x43, 0x68, 0x61, 0x74, 0x73, 0x52, 0x08, 0x72, 0x63, 0x73, + 0x43, 0x68, 0x61, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x07, 0x73, 0x69, 0x6d, 0x44, 0x61, 0x74, 0x61, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x2e, 0x53, 0x69, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x73, 0x69, 0x6d, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x12, 0x28, 0x0a, 0x06, 0x6e, 0x6f, 0x43, 0x6c, + 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2e, 0x4e, 0x6f, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6e, 0x6f, 0x43, 0x6c, + 0x75, 0x65, 0x22, 0x24, 0x0a, 0x08, 0x52, 0x43, 0x53, 0x43, 0x68, 0x61, 0x74, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x1f, 0x0a, 0x07, 0x42, 0x6f, 0x6f, 0x6c, + 0x4d, 0x73, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x22, 0xb1, 0x01, 0x0a, 0x07, 0x53, 0x69, + 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0e, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x12, 0x20, 0x0a, + 0x0b, 0x63, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x68, 0x65, 0x78, 0x48, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x68, 0x65, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x74, + 0x31, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x69, 0x6e, 0x74, 0x31, 0x22, 0x38, 0x0a, + 0x0e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x74, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x69, + 0x6e, 0x74, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x74, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x04, 0x69, 0x6e, 0x74, 0x32, 0x22, 0x1e, 0x0a, 0x06, 0x4e, 0x6f, 0x43, 0x6c, 0x75, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x08, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x37, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x37, 0x12, 0x1a, 0x0a, 0x08, - 0x6a, 0x73, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6a, 0x73, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x67, 0x0a, 0x0d, 0x42, 0x6f, 0x6f, 0x6c, - 0x65, 0x61, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x37, 0x12, 0x18, 0x0a, 0x07, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x31, 0x32, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x6d, 0x65, 0x45, 0x6d, + 0x6f, 0x6a, 0x69, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x6f, 0x6d, 0x65, + 0x45, 0x6d, 0x6f, 0x6a, 0x69, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x44, 0x61, + 0x74, 0x61, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x6d, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x6d, 0x65, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x22, 0xa1, 0x01, 0x0a, 0x0b, 0x52, 0x43, 0x53, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x14, + 0x73, 0x68, 0x6f, 0x77, 0x54, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x73, 0x68, 0x6f, 0x77, + 0x54, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x34, 0x22, 0xb0, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, + 0x61, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, - 0x62, 0x6f, 0x6f, 0x6c, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x33, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x33, 0x12, 0x14, 0x0a, 0x05, 0x62, - 0x6f, 0x6f, 0x6c, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, - 0x34, 0x22, 0xb0, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x73, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, - 0x6f, 0x6c, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x32, - 0x12, 0x2d, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x31, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x42, 0x6f, - 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x31, 0x12, - 0x2d, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x4d, 0x73, 0x67, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x32, 0x12, 0x14, - 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, - 0x6f, 0x6f, 0x6c, 0x33, 0x22, 0xc0, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x33, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x12, 0x14, 0x0a, - 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, - 0x6f, 0x6c, 0x33, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x34, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x34, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, - 0x6c, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x35, 0x12, - 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, - 0x62, 0x6f, 0x6f, 0x6c, 0x36, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x37, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x37, 0x12, 0x14, 0x0a, 0x05, 0x62, - 0x6f, 0x6f, 0x6c, 0x38, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, - 0x38, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x39, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x39, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, - 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x6f, 0x6f, 0x6c, 0x32, 0x12, 0x2d, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, + 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x6c, + 0x4d, 0x73, 0x67, 0x31, 0x12, 0x2d, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x32, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x6c, 0x4d, + 0x73, 0x67, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x33, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x33, 0x22, 0xc0, 0x01, 0x0a, 0x0e, 0x42, 0x6f, + 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x33, 0x12, 0x14, 0x0a, 0x05, + 0x62, 0x6f, 0x6f, 0x6c, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, + 0x6c, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x33, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, + 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x34, 0x12, 0x14, + 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, + 0x6f, 0x6f, 0x6c, 0x35, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x36, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x36, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, + 0x6f, 0x6c, 0x37, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x37, + 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x38, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x38, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x39, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x39, 0x42, 0x0e, 0x5a, 0x0c, + 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -836,31 +920,32 @@ func file_settings_proto_rawDescGZIP() []byte { return file_settings_proto_rawDescData } -var file_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_settings_proto_goTypes = []interface{}{ (*Settings)(nil), // 0: settings.Settings (*Data)(nil), // 1: settings.Data - (*BoolMsg)(nil), // 2: settings.BoolMsg - (*SimData)(nil), // 3: settings.SimData - (*UnknownMessage)(nil), // 4: settings.UnknownMessage - (*NoClue)(nil), // 5: settings.NoClue - (*OpCodeData)(nil), // 6: settings.OpCodeData - (*BooleanFields)(nil), // 7: settings.BooleanFields - (*BooleanFields2)(nil), // 8: settings.BooleanFields2 - (*BooleanFields3)(nil), // 9: settings.BooleanFields3 + (*RCSChats)(nil), // 2: settings.RCSChats + (*BoolMsg)(nil), // 3: settings.BoolMsg + (*SimData)(nil), // 4: settings.SimData + (*UnknownMessage)(nil), // 5: settings.UnknownMessage + (*NoClue)(nil), // 6: settings.NoClue + (*SomeData)(nil), // 7: settings.SomeData + (*RCSSettings)(nil), // 8: settings.RCSSettings + (*BooleanFields2)(nil), // 9: settings.BooleanFields2 + (*BooleanFields3)(nil), // 10: settings.BooleanFields3 } var file_settings_proto_depIdxs = []int32{ 1, // 0: settings.Settings.data:type_name -> settings.Data - 6, // 1: settings.Settings.opCodeData:type_name -> settings.OpCodeData - 7, // 2: settings.Settings.boolFields:type_name -> settings.BooleanFields - 8, // 3: settings.Settings.boolFields2:type_name -> settings.BooleanFields2 - 9, // 4: settings.Settings.boolFields3:type_name -> settings.BooleanFields3 - 2, // 5: settings.Data.boolMsg:type_name -> settings.BoolMsg - 3, // 6: settings.Data.simData:type_name -> settings.SimData - 5, // 7: settings.Data.noClue:type_name -> settings.NoClue - 4, // 8: settings.SimData.unknownMessage:type_name -> settings.UnknownMessage - 2, // 9: settings.BooleanFields2.boolMsg1:type_name -> settings.BoolMsg - 2, // 10: settings.BooleanFields2.boolMsg2:type_name -> settings.BoolMsg + 7, // 1: settings.Settings.opCodeData:type_name -> settings.SomeData + 8, // 2: settings.Settings.rcsSettings:type_name -> settings.RCSSettings + 9, // 3: settings.Settings.boolFields2:type_name -> settings.BooleanFields2 + 10, // 4: settings.Settings.boolFields3:type_name -> settings.BooleanFields3 + 2, // 5: settings.Data.rcsChats:type_name -> settings.RCSChats + 4, // 6: settings.Data.simData:type_name -> settings.SimData + 6, // 7: settings.Data.noClue:type_name -> settings.NoClue + 5, // 8: settings.SimData.unknownMessage:type_name -> settings.UnknownMessage + 3, // 9: settings.BooleanFields2.boolMsg1:type_name -> settings.BoolMsg + 3, // 10: settings.BooleanFields2.boolMsg2:type_name -> settings.BoolMsg 11, // [11:11] is the sub-list for method output_type 11, // [11:11] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name @@ -899,7 +984,7 @@ func file_settings_proto_init() { } } file_settings_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BoolMsg); i { + switch v := v.(*RCSChats); i { case 0: return &v.state case 1: @@ -911,7 +996,7 @@ func file_settings_proto_init() { } } file_settings_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimData); i { + switch v := v.(*BoolMsg); i { case 0: return &v.state case 1: @@ -923,7 +1008,7 @@ func file_settings_proto_init() { } } file_settings_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnknownMessage); i { + switch v := v.(*SimData); i { case 0: return &v.state case 1: @@ -935,7 +1020,7 @@ func file_settings_proto_init() { } } file_settings_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NoClue); i { + switch v := v.(*UnknownMessage); i { case 0: return &v.state case 1: @@ -947,7 +1032,7 @@ func file_settings_proto_init() { } } file_settings_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpCodeData); i { + switch v := v.(*NoClue); i { case 0: return &v.state case 1: @@ -959,7 +1044,7 @@ func file_settings_proto_init() { } } file_settings_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BooleanFields); i { + switch v := v.(*SomeData); i { case 0: return &v.state case 1: @@ -971,7 +1056,7 @@ func file_settings_proto_init() { } } file_settings_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BooleanFields2); i { + switch v := v.(*RCSSettings); i { case 0: return &v.state case 1: @@ -983,6 +1068,18 @@ func file_settings_proto_init() { } } file_settings_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BooleanFields2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_settings_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BooleanFields3); i { case 0: return &v.state @@ -1001,7 +1098,7 @@ func file_settings_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_settings_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, diff --git a/libgm/bugle_service.go b/libgm/bugle_service.go deleted file mode 100644 index 233b966..0000000 --- a/libgm/bugle_service.go +++ /dev/null @@ -1,12 +0,0 @@ -package libgm - -import "go.mau.fi/mautrix-gmessages/libgm/binary" - -func (c *Client) handleBugleOpCode(bugleData *binary.BugleBackendService) { - switch bugleData.Data.Type { - case 2: - c.Logger.Info().Any("type", bugleData.Data.Type).Msg("Updated sessionId to " + c.sessionHandler.sessionID + " due to BROWSER_ACTIVE alert") - case 6: - c.Logger.Info().Any("type", bugleData.Data.Type).Msg("USER_ALERT:BATTERY") // tf ? - } -} diff --git a/libgm/client.go b/libgm/client.go index 4b85a8d..fc64347 100644 --- a/libgm/client.go +++ b/libgm/client.go @@ -2,23 +2,33 @@ package libgm import ( "encoding/base64" + "encoding/json" + "fmt" "io" + "log" "net/http" - "net/http/cookiejar" "net/url" + "os" "time" "github.com/rs/zerolog" "go.mau.fi/mautrix-gmessages/libgm/binary" "go.mau.fi/mautrix-gmessages/libgm/crypto" + "go.mau.fi/mautrix-gmessages/libgm/events" "go.mau.fi/mautrix-gmessages/libgm/payload" + "go.mau.fi/mautrix-gmessages/libgm/pblite" "go.mau.fi/mautrix-gmessages/libgm/util" ) -type DevicePair struct { - Mobile *binary.Device - Browser *binary.Device +type AuthData struct { + TachyonAuthToken []byte `json:"tachyon_token,omitempty"` + TTL int64 `json:"ttl,omitempty"` + AuthenticatedAt *time.Time `json:"authenticated_at,omitempty"` + DevicePair *pblite.DevicePair `json:"device_pair,omitempty"` + Cryptor *crypto.Cryptor `json:"crypto,omitempty"` + WebEncryptionKey []byte `json:"web_encryption_key,omitempty"` + JWK *crypto.JWK `json:"jwk,omitempty"` } type Proxy func(*http.Request) (*url.URL, error) type EventHandler func(evt interface{}) @@ -26,67 +36,47 @@ type Client struct { Logger zerolog.Logger Conversations *Conversations Session *Session + Messages *Messages rpc *RPC - devicePair *DevicePair pairer *Pairer - cryptor *crypto.Cryptor - imageCryptor *crypto.ImageCryptor evHandler EventHandler sessionHandler *SessionHandler - instructions *Instructions - rpcKey []byte - ttl int64 + imageCryptor *crypto.ImageCryptor + authData *AuthData proxy Proxy http *http.Client } -func NewClient(devicePair *DevicePair, cryptor *crypto.Cryptor, logger zerolog.Logger, proxy *string) *Client { +func NewClient(authData *AuthData, logger zerolog.Logger) *Client { sessionHandler := &SessionHandler{ - requests: make(map[string]map[int64]*ResponseChan), + requests: make(map[string]map[binary.ActionType]*ResponseChan), responseTimeout: time.Duration(5000) * time.Millisecond, } - if cryptor == nil { - cryptor = crypto.NewCryptor(nil, nil) + if authData == nil { + authData = &AuthData{} + } + if authData.Cryptor == nil { + authData.Cryptor = crypto.NewCryptor(nil, nil) } - jar, _ := cookiejar.New(nil) cli := &Client{ + authData: authData, Logger: logger, - devicePair: devicePair, - sessionHandler: sessionHandler, - cryptor: cryptor, imageCryptor: &crypto.ImageCryptor{}, - http: &http.Client{ - Jar: jar, - }, + sessionHandler: sessionHandler, + http: &http.Client{}, } sessionHandler.client = cli - cli.instructions = NewInstructions(cli.cryptor) - if proxy != nil { - cli.SetProxy(*proxy) - } rpc := &RPC{client: cli, http: &http.Client{Transport: &http.Transport{Proxy: cli.proxy}}} cli.rpc = rpc - cli.Logger.Debug().Any("data", cryptor).Msg("Cryptor") + cli.Logger.Debug().Any("data", cli.authData.Cryptor).Msg("Cryptor") cli.setApiMethods() + cli.FetchConfigVersion() return cli } -var baseURL, _ = url.Parse("https://messages.google.com/") - -func (c *Client) GetCookies() []*http.Cookie { - return c.http.Jar.Cookies(baseURL) -} - -func (c *Client) SetCookies(cookies []*http.Cookie) { - c.http.Jar.SetCookies(baseURL, cookies) -} - func (c *Client) SetEventHandler(eventHandler EventHandler) { - if eventHandler == nil { - eventHandler = func(_ interface{}) {} - } c.evHandler = eventHandler } @@ -104,41 +94,65 @@ func (c *Client) SetProxy(proxy string) error { return nil } -func (c *Client) Connect(rpcKey []byte) error { - rpcPayload, receiveMesageSessionID, err := payload.ReceiveMessages(rpcKey) - if err != nil { - panic(err) - return err - } - c.rpc.rpcSessionID = receiveMesageSessionID - c.rpcKey = rpcKey - go c.rpc.ListenReceiveMessages(rpcPayload) - c.Logger.Debug().Any("rpcKey", rpcKey).Msg("Successfully connected to server") - if c.devicePair != nil { - sendInitialDataErr := c.rpc.sendInitialData() - if sendInitialDataErr != nil { - panic(sendInitialDataErr) - } - } - return nil -} +func (c *Client) Connect() error { + if c.authData.TachyonAuthToken != nil { -func (c *Client) Reconnect(rpcKey []byte) error { - c.rpc.CloseConnection() - for c.rpc.conn != nil { - time.Sleep(time.Millisecond * 100) + hasExpired, authenticatedAtSeconds := c.hasTachyonTokenExpired() + if hasExpired { + c.Logger.Error().Any("expired", hasExpired).Any("secondsSince", authenticatedAtSeconds).Msg("TachyonToken has expired! attempting to refresh") + refreshErr := c.refreshAuthToken() + if refreshErr != nil { + log.Fatal(refreshErr) + } + } + c.Logger.Info().Any("secondsSince", authenticatedAtSeconds).Any("token", c.authData.TachyonAuthToken).Msg("TachyonToken has not expired, attempting to connect...") + + webEncryptionKeyResponse, webEncryptionKeyErr := c.GetWebEncryptionKey() + if webEncryptionKeyErr != nil { + c.Logger.Err(webEncryptionKeyErr).Any("response", webEncryptionKeyResponse).Msg("GetWebEncryptionKey request failed") + return webEncryptionKeyErr + } + c.updateWebEncryptionKey(webEncryptionKeyResponse.GetKey()) + rpcPayload, receiveMessageSessionId, err := payload.ReceiveMessages(c.authData.TachyonAuthToken) + if err != nil { + log.Fatal(err) + return err + } + c.rpc.rpcSessionId = receiveMessageSessionId + go c.rpc.ListenReceiveMessages(rpcPayload) + c.sessionHandler.startAckInterval() + + bugleRes, bugleErr := c.Session.IsBugleDefault() + if bugleErr != nil { + log.Fatal(bugleErr) + } + c.Logger.Info().Any("isBugle", bugleRes.Success).Msg("IsBugleDefault") + sessionErr := c.Session.SetActiveSession() + if sessionErr != nil { + log.Fatal(sessionErr) + } + //c.Logger.Debug().Any("tachyonAuthToken", c.authData.TachyonAuthToken).Msg("Successfully connected to server") + return nil + } else { + pairer, err := c.NewPairer(nil, 20) + if err != nil { + log.Fatal(err) + } + c.pairer = pairer + registered, err2 := c.pairer.RegisterPhoneRelay() + if err2 != nil { + return err2 + } + c.authData.TachyonAuthToken = registered.AuthKeyData.TachyonAuthToken + rpcPayload, receiveMessageSessionId, err := payload.ReceiveMessages(c.authData.TachyonAuthToken) + if err != nil { + log.Fatal(err) + return err + } + c.rpc.rpcSessionId = receiveMessageSessionId + go c.rpc.ListenReceiveMessages(rpcPayload) + return nil } - err := c.Connect(rpcKey) - if err != nil { - c.Logger.Err(err).Any("rpcKey", rpcKey).Msg("Failed to reconnect") - return err - } - c.Logger.Debug().Any("rpcKey", rpcKey).Msg("Successfully reconnected to server") - sendInitialDataErr := c.rpc.sendInitialData() - if sendInitialDataErr != nil { - panic(sendInitialDataErr) - } - return nil } func (c *Client) Disconnect() { @@ -151,7 +165,34 @@ func (c *Client) IsConnected() bool { } func (c *Client) IsLoggedIn() bool { - return c.devicePair != nil + return c.authData != nil && c.authData.DevicePair != nil +} + +func (c *Client) hasTachyonTokenExpired() (bool, string) { + if c.authData.TachyonAuthToken == nil || c.authData.AuthenticatedAt == nil { + return true, "" + } else { + duration := time.Since(*c.authData.AuthenticatedAt) + seconds := fmt.Sprintf("%.3f", duration.Seconds()) + if duration.Microseconds() > 86400000000 { + return true, seconds + } + return false, seconds + } +} + +func (c *Client) Reconnect() error { + c.rpc.CloseConnection() + for c.rpc.conn != nil { + time.Sleep(time.Millisecond * 100) + } + err := c.Connect() + if err != nil { + c.Logger.Err(err).Any("tachyonAuthToken", c.authData.TachyonAuthToken).Msg("Failed to reconnect") + return err + } + c.Logger.Debug().Any("tachyonAuthToken", c.authData.TachyonAuthToken).Msg("Successfully reconnected to server") + return nil } func (c *Client) triggerEvent(evt interface{}) { @@ -161,63 +202,39 @@ func (c *Client) triggerEvent(evt interface{}) { } func (c *Client) setApiMethods() { - c.Conversations = &Conversations{ - client: c, - openConversation: openConversation{ - client: c, - }, - fetchConversationMessages: fetchConversationMessages{ - client: c, - }, - } - c.Session = &Session{ - client: c, - prepareNewSession: prepareNewSession{ - client: c, - }, - newSession: newSession{ - client: c, - }, - } + c.Conversations = &Conversations{client: c} + c.Session = &Session{client: c} + c.Messages = &Messages{client: c} } -func (c *Client) decryptImages(messages *binary.FetchMessagesResponse) error { +func (c *Client) decryptMedias(messages *binary.FetchMessagesResponse) error { for _, msg := range messages.Messages { - switch msg.GetType() { - case *binary.MessageType_IMAGE.Enum(): - for _, details := range msg.GetMessageInfo() { - switch data := details.GetData().(type) { - case *binary.MessageInfo_ImageContent: - decryptedImageData, err := c.decryptImageData(data.ImageContent.ImageID, data.ImageContent.DecryptionKey) - if err != nil { - panic(err) - return err - } - data.ImageContent.ImageData = decryptedImageData + for _, details := range msg.GetMessageInfo() { + switch data := details.GetData().(type) { + case *binary.MessageInfo_MediaContent: + decryptedMediaData, err := c.decryptMediaData(data.MediaContent.MediaID, data.MediaContent.DecryptionKey) + if err != nil { + log.Fatal(err) + return err } + data.MediaContent.MediaData = decryptedMediaData } } } return nil } -func (c *Client) decryptImageData(imageId string, key []byte) ([]byte, error) { +func (c *Client) decryptMediaData(mediaId string, key []byte) ([]byte, error) { reqId := util.RandomUUIDv4() download_metadata := &binary.UploadImagePayload{ MetaData: &binary.ImageMetaData{ - ImageID: imageId, + ImageID: mediaId, Encrypted: true, }, AuthData: &binary.AuthMessage{ - RequestID: reqId, - RpcKey: c.rpcKey, - Date: &binary.Date{ - Year: 2023, - Seq1: 6, - Seq2: 22, - Seq3: 4, - Seq4: 6, - }, + RequestID: reqId, + TachyonAuthToken: c.authData.TachyonAuthToken, + ConfigVersion: payload.ConfigMessage, }, } download_metadata_bytes, err2 := binary.EncodeProtoMessage(download_metadata) @@ -244,8 +261,154 @@ func (c *Client) decryptImageData(imageId string, key []byte) ([]byte, error) { c.imageCryptor.UpdateDecryptionKey(key) decryptedImageBytes, decryptionErr := c.imageCryptor.DecryptData(encryptedBuffImg) if decryptionErr != nil { - c.Logger.Err(err).Msg("Image decryption failed") + log.Println("Error:", decryptionErr) return nil, decryptionErr } return decryptedImageBytes, nil } + +func (c *Client) FetchConfigVersion() { + req, bErr := http.NewRequest("GET", util.CONFIG_URL, nil) + if bErr != nil { + log.Fatal(bErr) + } + + configRes, requestErr := c.http.Do(req) + if requestErr != nil { + log.Fatal(requestErr) + } + + responseBody, readErr := io.ReadAll(configRes.Body) + if readErr != nil { + log.Fatal(readErr) + } + + version, parseErr := util.ParseConfigVersion(responseBody) + if parseErr != nil { + log.Fatal(parseErr) + } + + currVersion := payload.ConfigMessage + if version.V1 != currVersion.V1 || version.V2 != currVersion.V2 || version.V3 != currVersion.V3 { + toLog := c.diffVersionFormat(currVersion, version) + c.Logger.Info().Any("version", toLog).Msg("There's a new version available!") + } else { + c.Logger.Info().Any("version", currVersion).Msg("You are running on the latest version.") + } +} + +func (c *Client) diffVersionFormat(curr *binary.ConfigVersion, latest *binary.ConfigVersion) string { + return fmt.Sprintf("%d.%d.%d -> %d.%d.%d", curr.V1, curr.V2, curr.V3, latest.V1, latest.V2, latest.V3) +} + +func (c *Client) updateWebEncryptionKey(key []byte) { + c.Logger.Debug().Any("key", key).Msg("Updated WebEncryptionKey") + c.authData.WebEncryptionKey = key +} + +func (c *Client) updateJWK(jwk *crypto.JWK) { + c.Logger.Debug().Any("jwk", jwk).Msg("Updated JWK") + c.authData.JWK = jwk +} + +func (c *Client) updateTachyonAuthToken(t []byte) { + authenticatedAt := util.TimestampNow() + c.authData.TachyonAuthToken = t + c.authData.AuthenticatedAt = &authenticatedAt + c.Logger.Debug().Any("authenticatedAt", authenticatedAt).Any("tachyonAuthToken", t).Msg("Updated TachyonAuthToken") +} + +func (c *Client) updateTTL(ttl int64) { + c.authData.TTL = ttl + c.Logger.Debug().Any("ttl", ttl).Msg("Updated TTL") +} + +func (c *Client) updateDevicePair(devicePair *pblite.DevicePair) { + c.authData.DevicePair = devicePair + c.Logger.Debug().Any("devicePair", devicePair).Msg("Updated DevicePair") +} + +func (c *Client) SaveAuthSession(path string) error { + toSaveJson, jsonErr := json.Marshal(c.authData) + if jsonErr != nil { + return jsonErr + } + writeErr := os.WriteFile(path, toSaveJson, os.ModePerm) + return writeErr +} + +func LoadAuthSession(path string) (*AuthData, error) { + jsonData, readErr := os.ReadFile(path) + if readErr != nil { + return nil, readErr + } + + sessionData := &AuthData{} + marshalErr := json.Unmarshal(jsonData, sessionData) + if marshalErr != nil { + return nil, marshalErr + } + + return sessionData, nil +} + +func (c *Client) refreshAuthToken() error { + + jwk := c.authData.JWK + requestId := util.RandomUUIDv4() + timestamp := time.Now().UnixMilli() * 1000 + + sig, sigErr := jwk.SignRequest(requestId, int64(timestamp)) + if sigErr != nil { + return sigErr + } + + payloadMessage, messageErr := payload.RegisterRefresh(sig, requestId, int64(timestamp), c.authData.DevicePair.Browser, c.authData.TachyonAuthToken) + if messageErr != nil { + return messageErr + } + + c.Logger.Info().Any("payload", string(payloadMessage)).Msg("Attempting to refresh auth token") + + refreshResponse, requestErr := c.rpc.sendMessageRequest(util.REGISTER_REFRESH, payloadMessage) + if requestErr != nil { + return requestErr + } + + if refreshResponse.StatusCode == 401 { + return fmt.Errorf("failed to refresh auth token: unauthorized (try reauthenticating through qr code)") + } + + if refreshResponse.StatusCode == 400 { + return fmt.Errorf("failed to refresh auth token: signature failed") + } + responseBody, readErr := io.ReadAll(refreshResponse.Body) + if readErr != nil { + return readErr + } + + var deserialized []interface{} + + marshalErr := json.Unmarshal(responseBody, &deserialized) + if marshalErr != nil { + return marshalErr + } + + resp := &binary.RegisterRefreshResponse{} + + deserializeErr := pblite.Deserialize(deserialized, resp.ProtoReflect()) + if deserializeErr != nil { + return deserializeErr + } + + token := resp.GetTokenData().GetTachyonAuthToken() + if token == nil { + return fmt.Errorf("failed to refresh auth token: something happened") + } + + c.Logger.Error().Any("expiry", resp.GetTokenData().GetValidFor()).Msg("TACHYON TOKEN VALID FOR") + + c.updateTachyonAuthToken(token) + c.triggerEvent(events.NewAuthTokenRefreshed(token)) + return nil +} diff --git a/libgm/command_handler.go b/libgm/command_handler.go deleted file mode 100644 index 0236440..0000000 --- a/libgm/command_handler.go +++ /dev/null @@ -1,33 +0,0 @@ -package libgm - -import ( - "go.mau.fi/mautrix-gmessages/libgm/binary" - "go.mau.fi/mautrix-gmessages/libgm/util" -) - -func (c *Client) processSessionResponse(prepareSession []*Response, newSession []*Response) (*util.SessionResponse, error) { - prepDecoded, prepDecodeErr := prepareSession[0].decryptData() - if prepDecodeErr != nil { - return nil, prepDecodeErr - } - - sessDecoded, sessDecodeErr := newSession[0].decryptData() - if sessDecodeErr != nil { - return nil, sessDecodeErr - } - - sess := sessDecoded.(*binary.NewSession) - prep := prepDecoded.(*binary.PrepareNewSession) - return &util.SessionResponse{ - Success: prep.Success, - Settings: sess.Settings, - }, nil -} - -func (c *Client) processFetchMessagesResponse(fetchMessagesRes []*Response, openConversationRes []*Response, setActiveConversationRes []*Response) (*binary.FetchMessagesResponse, error) { - messagesDecoded, messagesDecodeErr := fetchMessagesRes[0].decryptData() - if messagesDecodeErr != nil { - return nil, messagesDecodeErr - } - return messagesDecoded.(*binary.FetchMessagesResponse), nil -} diff --git a/libgm/conversation_builder.go b/libgm/conversation_builder.go new file mode 100644 index 0000000..34990a1 --- /dev/null +++ b/libgm/conversation_builder.go @@ -0,0 +1,95 @@ +package libgm + +import ( + "fmt" + "log" + + "google.golang.org/protobuf/proto" + + "go.mau.fi/mautrix-gmessages/libgm/binary" +) + +type ConversationBuilderError struct { + errMsg string +} + +func (cbe *ConversationBuilderError) Error() string { + return fmt.Sprintf("Failed to build conversation builder: %s", cbe.errMsg) +} + +type ConversationBuilder struct { + conversationId string + + actionStatus binary.ConversationActionStatus + status binary.ConversationStatus + muteStatus *binary.ConversationMuteStatus +} + +func (cb *ConversationBuilder) SetConversationId(conversationId string) *ConversationBuilder { + cb.conversationId = conversationId + return cb +} + +// For block, unblock, block & report +func (cb *ConversationBuilder) SetConversationActionStatus(actionStatus binary.ConversationActionStatus) *ConversationBuilder { + cb.actionStatus = actionStatus + return cb +} + +// For archive, unarchive, delete +func (cb *ConversationBuilder) SetConversationStatus(status binary.ConversationStatus) *ConversationBuilder { + cb.status = status + return cb +} + +func (cb *ConversationBuilder) SetMuteStatus(muteStatus *binary.ConversationMuteStatus) *ConversationBuilder { + cb.muteStatus = muteStatus + return cb +} + +func (cb *ConversationBuilder) Build(protoMessage proto.Message) (proto.Message, error) { + if cb.conversationId == "" { + return nil, &ConversationBuilderError{errMsg: "conversationID can not be empty"} + } + + switch protoMessage.(type) { + case *binary.UpdateConversationPayload: + payload, failedBuild := cb.buildUpdateConversationPayload() + if failedBuild != nil { + return nil, failedBuild + } + return payload, nil + default: + log.Fatal("Invalid protoMessage conversation builder type") + } + return nil, &ConversationBuilderError{errMsg: "failed to build for unknown reasons"} +} + +func (cb *ConversationBuilder) buildUpdateConversationPayload() (*binary.UpdateConversationPayload, error) { + if cb.actionStatus == 0 && cb.status == 0 && cb.muteStatus == nil { + return nil, &ConversationBuilderError{errMsg: "actionStatus, status & muteStatus can not be empty when updating conversation, set atleast 1"} + } + + payload := &binary.UpdateConversationPayload{} + + if cb.actionStatus != 0 { + payload.Action = cb.actionStatus + payload.Action5 = &binary.ConversationAction5{ + Field2: true, + } + payload.ConversationID = cb.conversationId + } else if cb.status != 0 || cb.muteStatus != nil { + payload.Data = &binary.UpdateConversationData{ConversationID: cb.conversationId} + if cb.muteStatus != nil { + payload.Data.Data = &binary.UpdateConversationData_Mute{Mute: *cb.muteStatus} + } else if cb.status != 0 { + payload.Data.Data = &binary.UpdateConversationData_Status{Status: cb.status} + } + } + + return payload, nil +} + +func (c *Client) NewConversationBuilder() *ConversationBuilder { + return &ConversationBuilder{} +} diff --git a/libgm/conversation_handler.go b/libgm/conversation_handler.go new file mode 100644 index 0000000..cbc1f1a --- /dev/null +++ b/libgm/conversation_handler.go @@ -0,0 +1,11 @@ +package libgm + +import ( + "go.mau.fi/mautrix-gmessages/libgm/pblite" + + "go.mau.fi/mautrix-gmessages/libgm/binary" +) + +func (c *Client) handleConversationEvent(res *pblite.Response, data *binary.Conversation) { + c.triggerEvent(data) +} diff --git a/libgm/conversations.go b/libgm/conversations.go index 2762496..859e06b 100644 --- a/libgm/conversations.go +++ b/libgm/conversations.go @@ -9,192 +9,116 @@ import ( type Conversations struct { client *Client - watching string // current open conversation - - openConversation openConversation - fetchConversationMessages fetchConversationMessages + synced bool } +// default is 25 count func (c *Conversations) List(count int64) (*binary.Conversations, error) { - encryptedProtoPayload := &binary.ListCoversationsPayload{Count: count, Field4: 1} - instruction, _ := c.client.instructions.GetInstruction(LIST_CONVERSATIONS) - sentRequestID, _ := c.client.createAndSendRequest(instruction.Opcode, c.client.ttl, false, encryptedProtoPayload.ProtoReflect()) + payload := &binary.ListCoversationsPayload{Count: count, Field4: 1} + var actionType binary.ActionType - responses, err := c.client.sessionHandler.WaitForResponse(sentRequestID, instruction.Opcode) + if !c.synced { + actionType = binary.ActionType_LIST_CONVERSATIONS_SYNC + c.synced = true + } else { + actionType = binary.ActionType_LIST_CONVERSATIONS + } + + sentRequestId, sendErr := c.client.sessionHandler.completeSendMessage(actionType, true, payload) + if sendErr != nil { + return nil, sendErr + } + + response, err := c.client.sessionHandler.WaitForResponse(sentRequestId, actionType) if err != nil { return nil, err } - decryptedProto, decryptErr := responses[0].decryptData() + + res, ok := response.Data.Decrypted.(*binary.Conversations) + if !ok { + return nil, fmt.Errorf("failed to assert response into Conversations") + } + + return res, nil +} + +func (c *Conversations) GetType(conversationId string) (*binary.GetConversationTypeResponse, error) { + payload := &binary.ConversationTypePayload{ConversationID: conversationId} + actionType := binary.ActionType_GET_CONVERSATION_TYPE + + sentRequestId, sendErr := c.client.sessionHandler.completeSendMessage(actionType, true, payload) + if sendErr != nil { + return nil, sendErr + } + + response, err := c.client.sessionHandler.WaitForResponse(sentRequestId, actionType) + if err != nil { + return nil, err + } + + res, ok := response.Data.Decrypted.(*binary.GetConversationTypeResponse) + if !ok { + return nil, fmt.Errorf("failed to assert response into GetConversationTypeResponse") + } + + return res, nil +} + +func (c *Conversations) FetchMessages(conversationId string, count int64, cursor *binary.Cursor) (*binary.FetchMessagesResponse, error) { + payload := &binary.FetchConversationMessagesPayload{ConversationID: conversationId, Count: count} + if cursor != nil { + payload.Cursor = cursor + } + + actionType := binary.ActionType_LIST_MESSAGES + + sentRequestId, sendErr := c.client.sessionHandler.completeSendMessage(actionType, true, payload) + if sendErr != nil { + return nil, sendErr + } + + response, err := c.client.sessionHandler.WaitForResponse(sentRequestId, actionType) + if err != nil { + return nil, err + } + + res, ok := response.Data.Decrypted.(*binary.FetchMessagesResponse) + if !ok { + return nil, fmt.Errorf("failed to assert response into FetchMessagesResponse") + } + + decryptErr := c.client.decryptMedias(res) if decryptErr != nil { return nil, decryptErr } - if decryptedData, ok := decryptedProto.(*binary.Conversations); ok { - return decryptedData, nil - } else { - return nil, fmt.Errorf("failed to assert decryptedProto into type Conversations") - } + c.client.Logger.Debug().Any("messageData", res).Msg("fetchmessages") + return res, nil } -func (c *Conversations) SendMessage(messageBuilder *MessageBuilder, selfParticipantID string) (*binary.SendMessageResponse, error) { - hasSelfParticipantId := messageBuilder.GetSelfParticipantID() - if hasSelfParticipantId == "" { - messageBuilder.SetSelfParticipantID(selfParticipantID) - } - - encryptedProtoPayload, failedToBuild := messageBuilder.Build() +func (c *Conversations) SendMessage(messageBuilder *MessageBuilder) (*binary.SendMessageResponse, error) { + payload, failedToBuild := messageBuilder.Build() if failedToBuild != nil { - panic(failedToBuild) + return nil, failedToBuild } - instruction, _ := c.client.instructions.GetInstruction(SEND_TEXT_MESSAGE) - c.client.Logger.Debug().Any("payload", encryptedProtoPayload).Msg("SendMessage Payload") - sentRequestID, _ := c.client.createAndSendRequest(instruction.Opcode, c.client.ttl, false, encryptedProtoPayload.ProtoReflect()) + actionType := binary.ActionType_SEND_MESSAGE - responses, err := c.client.sessionHandler.WaitForResponse(sentRequestID, instruction.Opcode) - if err != nil { - panic(err) - return nil, err + sentRequestId, sendErr := c.client.sessionHandler.completeSendMessage(actionType, true, payload) + if sendErr != nil { + return nil, sendErr } - decryptedProto, decryptErr := responses[0].decryptData() - if decryptErr != nil { - return nil, decryptErr - } - - if decryptedData, ok := decryptedProto.(*binary.SendMessageResponse); ok { - return decryptedData, nil - } else { - return nil, fmt.Errorf("failed to assert decryptedProto into type SendMessageResponse") - } -} - -func (c *Conversations) FetchMessages(convId string, count int64, cursor *binary.Cursor) (*binary.FetchMessagesResponse, error) { - - var openConversationRes []*Response - var openConversationErr error - if c.watching != convId { - openConversationRes, openConversationErr = c.openConversation.Execute(convId) - if openConversationErr != nil { - return nil, openConversationErr - } - c.watching = convId - } - - fetchMessagesRes, fetchMessagesErr := c.fetchConversationMessages.Execute(convId, count, cursor) - if fetchMessagesErr != nil { - return nil, fetchMessagesErr - } - - fetchedMessagesResponse, processFail := c.client.processFetchMessagesResponse(fetchMessagesRes, openConversationRes, nil) - if processFail != nil { - return nil, processFail - } - - return fetchedMessagesResponse, nil -} - -type fetchConversationMessages struct { - client *Client -} - -func (f *fetchConversationMessages) Execute(convId string, count int64, cursor *binary.Cursor) ([]*Response, error) { - encryptedProtoPayload := &binary.FetchConversationMessagesPayload{ConversationID: convId, Count: count, Cursor: cursor} - instruction, _ := f.client.instructions.GetInstruction(FETCH_MESSAGES_CONVERSATION) - sentRequestID, _ := f.client.createAndSendRequest(instruction.Opcode, f.client.ttl, false, encryptedProtoPayload.ProtoReflect()) - - responses, err := f.client.sessionHandler.WaitForResponse(sentRequestID, instruction.Opcode) + response, err := c.client.sessionHandler.WaitForResponse(sentRequestId, actionType) if err != nil { return nil, err } - return responses, nil -} - -type openConversation struct { - client *Client -} - -func (o *openConversation) Execute(convId string) ([]*Response, error) { - encryptedProtoPayload := &binary.OpenConversationPayload{ConversationID: convId} - instruction, _ := o.client.instructions.GetInstruction(OPEN_CONVERSATION) - sentRequestID, _ := o.client.createAndSendRequest(instruction.Opcode, o.client.ttl, false, encryptedProtoPayload.ProtoReflect()) - - responses, err := o.client.sessionHandler.WaitForResponse(sentRequestID, instruction.Opcode) - if err != nil { - return nil, err + res, ok := response.Data.Decrypted.(*binary.SendMessageResponse) + if !ok { + return nil, fmt.Errorf("failed to assert response into SendMessageResponse") } - // Rest of the processing... - - return responses, nil + c.client.Logger.Debug().Any("res", res).Msg("sent message!") + return res, nil } - -/* -func (c *Conversations) SendMessage(conversationID string, content string, participantCount string) (*binary.SendMessageResponse, error) { - encryptedProtoPayload := payload.NewSendConversationTextMessage(conversationID, content, participantCount) - sentRequestID, _ := c.client.createAndSendRequest(3, c.client.ttl, false, encryptedProtoPayload.ProtoReflect()) - c.client.Logger.Debug().Any("requestId", sentRequestID).Msg("Sent sendmessage request.") - response, responseErr := c.client.sessionHandler.WaitForResponse(sentRequestID, 3) - if responseErr != nil { - c.client.Logger.Err(responseErr).Msg("SendMessage channel response error") - return nil, responseErr - } else { - decryptedProto, decryptErr := response.decryptData() - if decryptErr != nil { - return nil, decryptErr - } - - if decryptedData, ok := decryptedProto.(*binary.SendMessageResponse); ok { - return decryptedData, nil - } else { - return nil, fmt.Errorf("failed to assert decryptedProto into type SendMessageResponse") - } - } -} - -func (c *Conversations) PrepareOpen() (interface{}, error) { - encryptedProtoPayload := &binary.PrepareOpenConversationPayload{Field2:1} - sentRequestID, _ := c.client.createAndSendRequest(22, c.client.ttl, false, encryptedProtoPayload.ProtoReflect()) - c.client.Logger.Debug().Any("requestId", sentRequestID).Msg("Sent PrepareOpenConversation request.") - response, responseErr := c.client.sessionHandler.WaitForResponse(sentRequestID, 22) - if responseErr != nil { - c.client.Logger.Err(responseErr).Msg("PrepareOpenConversation channel response error") - return nil, responseErr - } else { - c.client.Logger.Info().Any("response", response).Msg("PrepareOpenConversation response data") - } - return nil, nil -} - -func (c *Conversations) Open(conversationID string) (interface{}, error) { - encryptedProtoPayload := &binary.OpenConversationPayload{ConversationID:conversationID} - sentRequestID, _ := c.client.createAndSendRequest(21, c.client.ttl, false, encryptedProtoPayload.ProtoReflect()) - c.client.Logger.Debug().Any("requestId", sentRequestID).Msg("Sent OpenConversation request.") - response, responseErr := c.client.sessionHandler.WaitForResponse(sentRequestID, 21) - if responseErr != nil { - c.client.Logger.Err(responseErr).Msg("OpenConversation channel response error") - return nil, responseErr - } else { - c.client.Logger.Info().Any("response", response).Msg("OpenConversation response data") - } - return nil, nil -} - -func (c *Conversations) FetchMessages(conversationID string, count int64) (*binary.FetchMessagesResponse, error) { - encryptedProtoPayload := &binary.FetchConversationMessagesPayload{ConversationID:conversationID,Count:count} - sentRequestID, _ := c.client.createAndSendRequest(2, c.client.ttl, false, encryptedProtoPayload.ProtoReflect()) - c.client.Logger.Debug().Any("requestId", sentRequestID).Msg("Sent FetchMessages request.") - response, responseErr := c.client.sessionHandler.WaitForResponse(sentRequestID, 2) - if responseErr != nil { - c.client.Logger.Err(responseErr).Msg("FetchMessages channel response error") - return nil, responseErr - } else { - decryptedMessages, decryptedErr := c.client.newMessagesResponse(response) - if decryptedErr != nil { - return nil, decryptedErr - } - return decryptedMessages, nil - } -} -*/ diff --git a/libgm/crypto/ECDSA.go b/libgm/crypto/ECDSA.go index e7d4a3c..891d87a 100644 --- a/libgm/crypto/ECDSA.go +++ b/libgm/crypto/ECDSA.go @@ -18,7 +18,33 @@ type JWK struct { Y string `json:"y"` Ext bool `json:"ext"` KeyOps []string `json:"key_ops"` - PrivateBytes []byte `json:"privateBytes,omitempty"` + PrivateBytes []byte `json:"private_bytes,omitempty"` +} + +func (t *JWK) GetPrivateKey() (*ecdsa.PrivateKey, error) { + curve := elliptic.P256() + xBytes, err := base64.RawURLEncoding.DecodeString(t.X) + if err != nil { + return nil, err + } + yBytes, err := base64.RawURLEncoding.DecodeString(t.Y) + if err != nil { + return nil, err + } + dBytes, err := base64.RawURLEncoding.DecodeString(t.D) + if err != nil { + return nil, err + } + + priv := &ecdsa.PrivateKey{ + PublicKey: ecdsa.PublicKey{ + Curve: curve, + X: new(big.Int).SetBytes(xBytes), + Y: new(big.Int).SetBytes(yBytes), + }, + D: new(big.Int).SetBytes(dBytes), + } + return priv, nil } // Returns a byte slice containing the JWK and an error if the generation or export failed. diff --git a/libgm/crypto/cryptor.go b/libgm/crypto/cryptor.go index f5d91e8..ea8be5a 100644 --- a/libgm/crypto/cryptor.go +++ b/libgm/crypto/cryptor.go @@ -9,27 +9,27 @@ import ( "errors" "io" - "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-gmessages/libgm/binary" ) type Cryptor struct { - AESCTR256Key []byte - SHA256Key []byte + AESKey []byte `json:"aes_key"` + HMACKey []byte `json:"hmac_key"` } -func NewCryptor(aesKey []byte, shaKey []byte) *Cryptor { - if aesKey != nil && shaKey != nil { +func NewCryptor(aesKey []byte, hmacKey []byte) *Cryptor { + if aesKey != nil && hmacKey != nil { return &Cryptor{ - AESCTR256Key: aesKey, - SHA256Key: shaKey, + AESKey: aesKey, + HMACKey: hmacKey, } } - aesKey, shaKey = GenerateKeys() + aesKey, hmacKey = GenerateKeys() return &Cryptor{ - AESCTR256Key: aesKey, - SHA256Key: shaKey, + AESKey: aesKey, + HMACKey: hmacKey, } } @@ -39,7 +39,7 @@ func (c *Cryptor) Encrypt(plaintext []byte) ([]byte, error) { return nil, err } - block, err := aes.NewCipher(c.AESCTR256Key) + block, err := aes.NewCipher(c.AESKey) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func (c *Cryptor) Encrypt(plaintext []byte) ([]byte, error) { ciphertext = append(ciphertext, iv...) - mac := hmac.New(sha256.New, c.SHA256Key) + mac := hmac.New(sha256.New, c.HMACKey) mac.Write(ciphertext) hmac := mac.Sum(nil) @@ -67,7 +67,7 @@ func (c *Cryptor) Decrypt(encryptedData []byte) ([]byte, error) { hmacSignature := encryptedData[len(encryptedData)-32:] encryptedDataWithoutHMAC := encryptedData[:len(encryptedData)-32] - mac := hmac.New(sha256.New, c.SHA256Key) + mac := hmac.New(sha256.New, c.HMACKey) mac.Write(encryptedDataWithoutHMAC) expectedHMAC := mac.Sum(nil) @@ -78,7 +78,7 @@ func (c *Cryptor) Decrypt(encryptedData []byte) ([]byte, error) { iv := encryptedDataWithoutHMAC[len(encryptedDataWithoutHMAC)-16:] encryptedDataWithoutHMAC = encryptedDataWithoutHMAC[:len(encryptedDataWithoutHMAC)-16] - block, err := aes.NewCipher(c.AESCTR256Key) + block, err := aes.NewCipher(c.AESKey) if err != nil { return nil, err } @@ -88,7 +88,7 @@ func (c *Cryptor) Decrypt(encryptedData []byte) ([]byte, error) { return encryptedDataWithoutHMAC, nil } -func (c *Cryptor) DecryptAndDecodeData(encryptedData []byte, message protoreflect.ProtoMessage) error { +func (c *Cryptor) DecryptAndDecodeData(encryptedData []byte, message proto.Message) error { decryptedData, err := c.Decrypt(encryptedData) if err != nil { return err @@ -99,3 +99,17 @@ func (c *Cryptor) DecryptAndDecodeData(encryptedData []byte, message protoreflec } return nil } + +func (c *Cryptor) EncodeAndEncryptData(message proto.Message) ([]byte, error) { + encodedData, encodeErr := binary.EncodeProtoMessage(message) + if encodeErr != nil { + return nil, encodeErr + } + + encryptedData, encryptErr := c.Encrypt(encodedData) + if encryptErr != nil { + return nil, encryptErr + } + + return encryptedData, nil +} diff --git a/libgm/crypto/decode.go b/libgm/crypto/decode.go index 0b9fffc..519433a 100644 --- a/libgm/crypto/decode.go +++ b/libgm/crypto/decode.go @@ -19,16 +19,3 @@ func DecodeAndEncodeB64(data string, msg proto.Message) error { } return nil } - -func DecodeEncodedResponse(data string) (*binary.EncodedResponse, error) { - decodedBytes, err := base64.StdEncoding.DecodeString(data) - if err != nil { - return nil, err - } - decodedData := &binary.EncodedResponse{} - err = binary.DecodeProtoMessage(decodedBytes, decodedData) - if err != nil { - return nil, err - } - return decodedData, nil -} diff --git a/libgm/crypto/encode.go b/libgm/crypto/encode.go index 2be921a..74be9f2 100644 --- a/libgm/crypto/encode.go +++ b/libgm/crypto/encode.go @@ -11,6 +11,22 @@ import ( var SequenceOne = []int{1, 2, 840, 10045, 2, 1} var SequenceTwo = []int{1, 2, 840, 10045, 3, 1, 7} +func EncodeBNA(a []byte) []byte { + b := 0 + for b < len(a) && a[b] == 0 { + b++ + } + + c := 0 + if b < len(a) && (a[b]&128) == 128 { + c = 1 + } + + d := make([]byte, len(a)-b+c) + copy(d[c:], a[b:]) + return d +} + func EncodeValues(a *[]byte, b []int) { *a = append(*a, 6) idx := len(*a) diff --git a/libgm/crypto/signer.go b/libgm/crypto/signer.go new file mode 100644 index 0000000..b662772 --- /dev/null +++ b/libgm/crypto/signer.go @@ -0,0 +1,52 @@ +package crypto + +import ( + "crypto/ecdsa" + "crypto/rand" + "crypto/sha256" + "encoding/base64" + "fmt" +) + +func (t *JWK) SignRequest(requestId string, timestamp int64) (string, error) { + signBytes := []byte(fmt.Sprintf("%s:%d", requestId, timestamp)) + + privKey, privErr := t.GetPrivateKey() + if privErr != nil { + return "", privErr + } + + signature, sigErr := t.sign(privKey, signBytes) + if sigErr != nil { + return "", sigErr + } + encodedSignature := base64.StdEncoding.EncodeToString(signature) + return encodedSignature, nil +} + +func (t *JWK) sign(key *ecdsa.PrivateKey, msg []byte) ([]byte, error) { + hash := sha256.Sum256(msg) + r, s, err := ecdsa.Sign(rand.Reader, key, hash[:]) + if err != nil { + return nil, err + } + + rBytes := r.Bytes() + sBytes := s.Bytes() + + rBytes = EncodeBNA(rBytes) + sBytes = EncodeBNA(sBytes) + + sigLen := len(rBytes) + len(sBytes) + 6 // 2 bytes for each sequence tag and 2 bytes for each length field + sig := make([]byte, sigLen) + sig[0] = 48 + sig[1] = byte(sigLen - 2) + sig[2] = 2 + sig[3] = byte(len(rBytes)) + copy(sig[4:], rBytes) + sig[4+len(rBytes)] = 2 + sig[5+len(rBytes)] = byte(len(sBytes)) + copy(sig[6+len(rBytes):], sBytes) + + return sig, nil +} diff --git a/libgm/event_handler.go b/libgm/event_handler.go index baf7a3b..b0cb91c 100644 --- a/libgm/event_handler.go +++ b/libgm/event_handler.go @@ -1,33 +1,58 @@ package libgm import ( - "encoding/base64" + "encoding/json" + "fmt" - "google.golang.org/protobuf/proto" + "go.mau.fi/mautrix-gmessages/libgm/pblite" "go.mau.fi/mautrix-gmessages/libgm/binary" ) -func (c *Client) handleEventOpCode(response *Response) { - c.Logger.Debug().Any("res", response).Msg("got event response?") - eventData := &binary.Event{} - data, decryptedErr := c.cryptor.Decrypt(response.Data.EncryptedData) - if decryptedErr != nil { - panic(decryptedErr) +var skipCount int32 + +func (r *RPC) HandleRPCMsg(msgArr []interface{}) { + response, decodeErr := pblite.DecodeAndDecryptInternalMessage(msgArr, r.client.authData.Cryptor) + if decodeErr != nil { + r.client.Logger.Error().Err(fmt.Errorf("failed to deserialize response %s", msgArr)).Msg("rpc deserialize msg err") + return } - c.Logger.Debug().Str("protobuf_data", base64.StdEncoding.EncodeToString(data)).Msg("decrypted data") - err := proto.Unmarshal(data, eventData) - if err != nil { - panic(err) + //r.client.Logger.Debug().Any("byteLength", len(data)).Any("unmarshaled", response).Any("raw", string(data)).Msg("RPC Msg") + if response == nil { + r.client.Logger.Error().Err(fmt.Errorf("response data was nil %s", msgArr)).Msg("rpc msg data err") + return } - switch evt := eventData.Event.(type) { - case *binary.Event_MessageEvent: - c.handleMessageEvent(response, evt) - case *binary.Event_ConversationEvent: - c.handleConversationEvent(response, evt) - case *binary.Event_UserAlertEvent: - c.handleUserAlertEvent(response, evt) - default: - c.Logger.Debug().Any("res", response).Msg("unknown event") + //r.client.Logger.Debug().Any("response", response).Msg("decrypted & decoded response") + _, waitingForResponse := r.client.sessionHandler.requests[response.Data.RequestId] + + //r.client.Logger.Info().Any("raw", msgArr).Msg("Got msg") + //r.client.Logger.Debug().Any("waiting", waitingForResponse).Msg("got request! waiting?") + r.client.sessionHandler.addResponseAck(response.ResponseId) + if waitingForResponse { + r.client.sessionHandler.respondToRequestChannel(response) + } else { + switch response.BugleRoute { + case binary.BugleRoute_PairEvent: + r.client.handlePairingEvent(response) + case binary.BugleRoute_DataEvent: + if skipCount > 0 { + skipCount-- + r.client.Logger.Info().Any("action", response.Data.Action).Any("toSkip", skipCount).Msg("Skipped DataEvent") + return + } + r.client.handleUpdatesEvent(response) + default: + r.client.Logger.Debug().Any("res", response).Msg("Got unknown bugleroute") + } } + +} + +func (r *RPC) tryUnmarshalJSON(jsonData []byte, msgArr *[]interface{}) error { + err := json.Unmarshal(jsonData, &msgArr) + return err +} + +func (r *RPC) HandleByLength(data []byte) { + r.client.Logger.Debug().Any("byteLength", len(data)).Any("corrupt raw", string(data)).Msg("RPC Corrupt json") } diff --git a/libgm/events/qr.go b/libgm/events/qr.go index 45c0992..1efb94b 100644 --- a/libgm/events/qr.go +++ b/libgm/events/qr.go @@ -9,5 +9,5 @@ type QR struct { } type PairSuccessful struct { - *binary.Container + *binary.PairedData } diff --git a/libgm/events/ready.go b/libgm/events/ready.go index f6f0f38..dc605c3 100644 --- a/libgm/events/ready.go +++ b/libgm/events/ready.go @@ -3,16 +3,28 @@ package events import ( "net/http" - "go.mau.fi/mautrix-gmessages/libgm/util" + "go.mau.fi/mautrix-gmessages/libgm/binary" ) type ClientReady struct { - Session *util.SessionResponse + SessionId string + Conversations []*binary.Conversation } -func NewClientReady(session *util.SessionResponse) *ClientReady { +func NewClientReady(sessionId string, conversationList *binary.Conversations) *ClientReady { return &ClientReady{ - Session: session, + SessionId: sessionId, + Conversations: conversationList.Conversations, + } +} + +type AuthTokenRefreshed struct { + Token []byte +} + +func NewAuthTokenRefreshed(token []byte) *AuthTokenRefreshed { + return &AuthTokenRefreshed{ + Token: token, } } diff --git a/libgm/events/settings.go b/libgm/events/settings.go new file mode 100644 index 0000000..c5c6a34 --- /dev/null +++ b/libgm/events/settings.go @@ -0,0 +1,21 @@ +package events + +import "go.mau.fi/mautrix-gmessages/libgm/binary" + +type SettingEvent interface { + GetSettings() *binary.Settings +} + +type SETTINGS_UPDATED struct { + Settings *binary.Settings +} + +func (su *SETTINGS_UPDATED) GetSettings() *binary.Settings { + return su.Settings +} + +func NewSettingsUpdated(settings *binary.Settings) SettingEvent { + return &SETTINGS_UPDATED{ + Settings: settings, + } +} diff --git a/libgm/events/typing.go b/libgm/events/typing.go new file mode 100644 index 0000000..09ae0d0 --- /dev/null +++ b/libgm/events/typing.go @@ -0,0 +1,50 @@ +package events + +import "go.mau.fi/mautrix-gmessages/libgm/binary" + +type TypingEvent interface { + GetConversation() string +} + +type User struct { + Field1 int64 + Number string +} + +type STARTED_TYPING struct { + ConversationId string + User User +} + +func (t *STARTED_TYPING) GetConversation() string { + return t.ConversationId +} + +func NewStartedTyping(data *binary.TypingData) TypingEvent { + return &STARTED_TYPING{ + ConversationId: data.ConversationID, + User: User{ + Field1: data.User.Field1, + Number: data.User.Number, + }, + } +} + +type STOPPED_TYPING struct { + ConversationId string + User User +} + +func (t *STOPPED_TYPING) GetConversation() string { + return t.ConversationId +} + +func NewStoppedTyping(data *binary.TypingData) TypingEvent { + return &STOPPED_TYPING{ + ConversationId: data.ConversationID, + User: User{ + Field1: data.User.Field1, + Number: data.User.Number, + }, + } +} diff --git a/libgm/events/useralerts.go b/libgm/events/useralerts.go index e1392fe..a00730b 100644 --- a/libgm/events/useralerts.go +++ b/libgm/events/useralerts.go @@ -1,23 +1,35 @@ package events type BrowserActive struct { - SessionID string + SessionId string } -func NewBrowserActive(sessionID string) *BrowserActive { +func NewBrowserActive(sessionId string) *BrowserActive { return &BrowserActive{ - SessionID: sessionID, + SessionId: sessionId, } } -type Battery struct{} +type MOBILE_BATTERY_RESTORED struct{} -func NewBattery() *Battery { - return &Battery{} +func NewMobileBatteryRestored() *MOBILE_BATTERY_RESTORED { + return &MOBILE_BATTERY_RESTORED{} } -type DataConnection struct{} +type MOBILE_BATTERY_LOW struct{} -func NewDataConnection() *DataConnection { - return &DataConnection{} +func NewMobileBatteryLow() *MOBILE_BATTERY_LOW { + return &MOBILE_BATTERY_LOW{} +} + +type MOBILE_DATA_CONNECTION struct{} + +func NewMobileDataConnection() *MOBILE_DATA_CONNECTION { + return &MOBILE_DATA_CONNECTION{} +} + +type MOBILE_WIFI_CONNECTION struct{} + +func NewMobileWifiConnection() *MOBILE_WIFI_CONNECTION { + return &MOBILE_WIFI_CONNECTION{} } diff --git a/libgm/handler_conversation.go b/libgm/handler_conversation.go deleted file mode 100644 index f707763..0000000 --- a/libgm/handler_conversation.go +++ /dev/null @@ -1,9 +0,0 @@ -package libgm - -import ( - "go.mau.fi/mautrix-gmessages/libgm/binary" -) - -func (c *Client) handleConversationEvent(response *Response, evtData *binary.Event_ConversationEvent) { - c.triggerEvent(evtData) -} diff --git a/libgm/handler_message.go b/libgm/handler_message.go deleted file mode 100644 index 0397a5f..0000000 --- a/libgm/handler_message.go +++ /dev/null @@ -1,9 +0,0 @@ -package libgm - -import ( - "go.mau.fi/mautrix-gmessages/libgm/binary" -) - -func (c *Client) handleMessageEvent(response *Response, evtData *binary.Event_MessageEvent) { - c.triggerEvent(evtData) -} diff --git a/libgm/handler_useralert.go b/libgm/handler_useralert.go deleted file mode 100644 index 04b8ae1..0000000 --- a/libgm/handler_useralert.go +++ /dev/null @@ -1,23 +0,0 @@ -package libgm - -import ( - "go.mau.fi/mautrix-gmessages/libgm/binary" - "go.mau.fi/mautrix-gmessages/libgm/events" -) - -func (c *Client) handleUserAlertEvent(response *Response, evtData *binary.Event_UserAlertEvent) { - switch evtData.UserAlertEvent.AlertType { - case 2: - browserActive := events.NewBrowserActive(response.Data.RequestID) - c.triggerEvent(browserActive) - return - case 5, 6: - batteryEvt := events.NewBattery() - c.triggerEvent(batteryEvt) - return - case 3, 4: - dataConnectionEvt := events.NewDataConnection() - c.triggerEvent(dataConnectionEvt) - return - } -} diff --git a/libgm/instructions.go b/libgm/instructions.go deleted file mode 100644 index 76c0c49..0000000 --- a/libgm/instructions.go +++ /dev/null @@ -1,78 +0,0 @@ -package libgm - -import ( - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - - "go.mau.fi/mautrix-gmessages/libgm/binary" - "go.mau.fi/mautrix-gmessages/libgm/crypto" -) - -const ( - ROUTING_OPCODE = 19 - MSG_TYPE_TWO = 2 - MSG_TYPE_SIXTEEN = 16 - - /* - Session - */ - PREPARE_NEW_SESSION_OPCODE = 31 - NEW_SESSION_OPCODE = 16 - - /* - Conversation - */ - LIST_CONVERSATIONS = 1 - SET_ACTIVE_CONVERSATION = 22 - OPEN_CONVERSATION = 21 - FETCH_MESSAGES_CONVERSATION = 2 - SEND_TEXT_MESSAGE = 3 -) - -type Instruction struct { - cryptor *crypto.Cryptor - RoutingOpCode int64 - Opcode int64 - MsgType int64 - EncryptedData []byte - DecryptedProtoMessage proto.Message - ExpectedResponses int64 // count expected responses - ProcessResponses func(responses []*Response) (interface{}, error) // function that decodes & decrypts the slice into appropriate response -} - -func (c *Client) EncryptPayloadData(message protoreflect.Message) ([]byte, error) { - protoBytes, err1 := binary.EncodeProtoMessage(message.Interface()) - if err1 != nil { - return nil, err1 - } - encryptedBytes, err := c.cryptor.Encrypt(protoBytes) - if err != nil { - return nil, err - } - return encryptedBytes, nil -} - -type Instructions struct { - data map[int64]*Instruction -} - -func NewInstructions(cryptor *crypto.Cryptor) *Instructions { - return &Instructions{ - data: map[int64]*Instruction{ - PREPARE_NEW_SESSION_OPCODE: {cryptor, ROUTING_OPCODE, PREPARE_NEW_SESSION_OPCODE, MSG_TYPE_TWO, nil, &binary.PrepareNewSession{}, 1, nil}, - NEW_SESSION_OPCODE: {cryptor, ROUTING_OPCODE, NEW_SESSION_OPCODE, MSG_TYPE_TWO, nil, &binary.NewSession{}, 2, nil}, // create new session - LIST_CONVERSATIONS: {cryptor, ROUTING_OPCODE, LIST_CONVERSATIONS, MSG_TYPE_SIXTEEN, nil, &binary.Conversations{}, 1, nil}, // list conversations - - //22: {cryptor,19,22,2,nil,nil}, // SET ACTIVE SESSION WINDOW - OPEN_CONVERSATION: {cryptor, ROUTING_OPCODE, OPEN_CONVERSATION, MSG_TYPE_TWO, nil, nil, 2, nil}, // open conversation - FETCH_MESSAGES_CONVERSATION: {cryptor, ROUTING_OPCODE, FETCH_MESSAGES_CONVERSATION, MSG_TYPE_TWO, nil, &binary.FetchMessagesResponse{}, 1, nil}, // fetch messages in convo - SEND_TEXT_MESSAGE: {cryptor, ROUTING_OPCODE, SEND_TEXT_MESSAGE, MSG_TYPE_TWO, nil, &binary.SendMessageResponse{}, 1, nil}, - //3: {cryptor,19,3,2,nil,&binary.SendMessageResponse{}}, // send text message - }, - } -} - -func (i *Instructions) GetInstruction(key int64) (*Instruction, bool) { - instruction, ok := i.data[key] - return instruction, ok -} diff --git a/libgm/media_processor.go b/libgm/media_processor.go index 559a9c3..2f63210 100644 --- a/libgm/media_processor.go +++ b/libgm/media_processor.go @@ -4,11 +4,13 @@ import ( "bytes" "errors" "io" + "log" "net/http" "strconv" "go.mau.fi/mautrix-gmessages/libgm/binary" "go.mau.fi/mautrix-gmessages/libgm/crypto" + "go.mau.fi/mautrix-gmessages/libgm/payload" "go.mau.fi/mautrix-gmessages/libgm/util" ) @@ -38,6 +40,7 @@ func (c *Client) FinalizeUploadMedia(upload *StartGoogleUpload) (*MediaUpload, e imageType := upload.Image.GetImageType() encryptedImageSize := strconv.Itoa(len(upload.EncryptedMediaBytes)) + log.Println("EncryptedImageSize:", encryptedImageSize) finalizeUploadHeaders := util.NewMediaUploadHeaders(encryptedImageSize, "upload, finalize", "0", imageType.Format, "") req, reqErr := http.NewRequest("POST", upload.UploadURL, bytes.NewBuffer(upload.EncryptedMediaBytes)) if reqErr != nil { @@ -48,7 +51,7 @@ func (c *Client) FinalizeUploadMedia(upload *StartGoogleUpload) (*MediaUpload, e res, resErr := c.http.Do(req) if resErr != nil { - panic(resErr) + log.Fatal(resErr) } statusCode := res.StatusCode @@ -65,7 +68,7 @@ func (c *Client) FinalizeUploadMedia(upload *StartGoogleUpload) (*MediaUpload, e } uploadStatus := rHeaders.Get("x-goog-upload-status") - c.Logger.Debug().Str("upload_status", uploadStatus).Msg("Upload status") + log.Println("Upload Status: ", uploadStatus) mediaIDs := &binary.UploadMediaResponse{} err3 = crypto.DecodeAndEncodeB64(string(googleResponse), mediaIDs) @@ -103,7 +106,7 @@ func (c *Client) StartUploadMedia(image *Image) (*StartGoogleUpload, error) { res, resErr := c.http.Do(req) if resErr != nil { - panic(resErr) + log.Fatal(resErr) } statusCode := res.StatusCode @@ -132,21 +135,15 @@ func (c *Client) StartUploadMedia(image *Image) (*StartGoogleUpload, error) { } func (c *Client) buildStartUploadPayload() (string, error) { - requestId := util.RandomUUIDv4() + requestID := util.RandomUUIDv4() protoData := &binary.StartMediaUploadPayload{ ImageType: 1, AuthData: &binary.AuthMessage{ - RequestID: requestId, - RpcKey: c.rpcKey, - Date: &binary.Date{ - Year: 2023, - Seq1: 6, - Seq2: 22, - Seq3: 4, - Seq4: 6, - }, + RequestID: requestID, + TachyonAuthToken: c.authData.TachyonAuthToken, + ConfigVersion: payload.ConfigMessage, }, - Mobile: c.devicePair.Mobile, + Mobile: c.authData.DevicePair.Mobile, } protoDataEncoded, protoEncodeErr := crypto.EncodeProtoB64(protoData) diff --git a/libgm/message_builder.go b/libgm/message_builder.go index 1b8993a..012d94d 100644 --- a/libgm/message_builder.go +++ b/libgm/message_builder.go @@ -21,12 +21,13 @@ type MessageBuilder struct { tmpID string selfParticipantID string + replyToMessageID string + images []*MediaUpload err error } -// Add this method to retrieve the stored error func (mb *MessageBuilder) Err() error { return mb.err } @@ -39,32 +40,38 @@ func (mb *MessageBuilder) GetContent() string { return mb.content } +func (mb *MessageBuilder) GetConversationID() string { + return mb.conversationID +} + +func (mb *MessageBuilder) GetSelfParticipantID() string { + return mb.selfParticipantID +} + +func (mb *MessageBuilder) GetTmpID() string { + return mb.tmpID +} + func (mb *MessageBuilder) SetContent(content string) *MessageBuilder { mb.content = content return mb } -func (mb *MessageBuilder) GetConversationID() string { - return mb.conversationID -} - func (mb *MessageBuilder) SetConversationID(conversationId string) *MessageBuilder { mb.conversationID = conversationId return mb } -func (mb *MessageBuilder) GetSelfParticipantID() string { - return mb.selfParticipantID -} - // sendmessage function will set this automatically but if u want to set it yourself feel free func (mb *MessageBuilder) SetSelfParticipantID(participantId string) *MessageBuilder { mb.selfParticipantID = participantId return mb } -func (mb *MessageBuilder) GetTmpID() string { - return mb.tmpID +// messageID of the message to reply to +func (mb *MessageBuilder) SetReplyMessage(messageId string) *MessageBuilder { + mb.replyToMessageID = messageId + return mb } // sendmessage function will set this automatically but if u want to set it yourself feel free @@ -107,10 +114,10 @@ func (c *Client) NewMessageBuilder() *MessageBuilder { func (mb *MessageBuilder) newSendConversationMessage() *binary.SendMessagePayload { - convID := mb.GetConversationID() + convId := mb.GetConversationID() content := mb.GetContent() - selfParticipantID := mb.GetSelfParticipantID() - tmpID := mb.GetTmpID() + selfParticipantId := mb.GetSelfParticipantID() + tmpId := mb.GetTmpID() messageInfo := make([]*binary.MessageInfo, 0) messageInfo = append(messageInfo, &binary.MessageInfo{Data: &binary.MessageInfo_MessageContent{ @@ -122,16 +129,17 @@ func (mb *MessageBuilder) newSendConversationMessage() *binary.SendMessagePayloa mb.appendImagesPayload(&messageInfo) sendMsgPayload := &binary.SendMessagePayload{ - ConversationID: convID, + ConversationID: convId, MessagePayload: &binary.MessagePayload{ - TmpID: tmpID, - ConversationID: convID, - SelfParticipantID: selfParticipantID, + TmpID: tmpId, + ConversationID: convId, + SelfParticipantID: selfParticipantId, MessageInfo: messageInfo, - TmpID2: tmpID, + TmpID2: tmpId, }, - TmpID: tmpID, + TmpID: tmpId, } + if len(content) > 0 { sendMsgPayload.MessagePayload.MessagePayloadContent = &binary.MessagePayloadContent{ MessageContent: &binary.MessageContent{ @@ -139,6 +147,12 @@ func (mb *MessageBuilder) newSendConversationMessage() *binary.SendMessagePayloa }, } } + + if mb.replyToMessageID != "" { + sendMsgPayload.IsReply = true + sendMsgPayload.Reply = &binary.ReplyPayload{MessageID: mb.replyToMessageID} + } + mb.client.Logger.Debug().Any("sendMsgPayload", sendMsgPayload).Msg("sendMessagePayload") return sendMsgPayload @@ -157,16 +171,16 @@ func (mb *MessageBuilder) appendImagesPayload(messageInfo *[]*binary.MessageInfo func (mb *MessageBuilder) newImageContent(media *MediaUpload) *binary.MessageInfo { imageMessage := &binary.MessageInfo{ - Data: &binary.MessageInfo_ImageContent{ - ImageContent: &binary.ImageContent{ - SomeNumber: media.Image.GetImageType().Type, - ImageID: media.MediaID, - ImageName: media.Image.GetImageName(), + Data: &binary.MessageInfo_MediaContent{ + MediaContent: &binary.MediaContent{ + Format: binary.MediaFormats(media.Image.GetImageType().Type), + MediaID: media.MediaID, + MediaName: media.Image.GetImageName(), Size: media.Image.GetImageSize(), DecryptionKey: media.Image.GetImageCryptor().GetKey(), }, }, } - mb.client.Logger.Debug().Any("imageMessage", imageMessage).Msg("New Image Content") + mb.client.Logger.Debug().Any("imageMessage", imageMessage).Msg("New Media Content") return imageMessage } diff --git a/libgm/message_handler.go b/libgm/message_handler.go new file mode 100644 index 0000000..36e94f7 --- /dev/null +++ b/libgm/message_handler.go @@ -0,0 +1,10 @@ +package libgm + +import ( + "go.mau.fi/mautrix-gmessages/libgm/binary" + "go.mau.fi/mautrix-gmessages/libgm/pblite" +) + +func (c *Client) handleMessageEvent(res *pblite.Response, data *binary.Message) { + c.triggerEvent(data) +} diff --git a/libgm/messages.go b/libgm/messages.go new file mode 100644 index 0000000..a9da238 --- /dev/null +++ b/libgm/messages.go @@ -0,0 +1,61 @@ +package libgm + +import ( + "fmt" + + "go.mau.fi/mautrix-gmessages/libgm/binary" +) + +type Messages struct { + client *Client +} + +func (m *Messages) React(reactionBuilder *ReactionBuilder) (*binary.SendReactionResponse, error) { + payload, buildErr := reactionBuilder.Build() + if buildErr != nil { + return nil, buildErr + } + + actionType := binary.ActionType_SEND_REACTION + + sentRequestId, sendErr := m.client.sessionHandler.completeSendMessage(actionType, true, payload) + if sendErr != nil { + return nil, sendErr + } + + response, err := m.client.sessionHandler.WaitForResponse(sentRequestId, actionType) + if err != nil { + return nil, err + } + + res, ok := response.Data.Decrypted.(*binary.SendReactionResponse) + if !ok { + return nil, fmt.Errorf("failed to assert response into SendReactionResponse") + } + + m.client.Logger.Debug().Any("res", res).Msg("sent reaction!") + return res, nil +} + +func (m *Messages) Delete(messageId string) (*binary.DeleteMessageResponse, error) { + payload := &binary.DeleteMessagePayload{MessageID: messageId} + actionType := binary.ActionType_DELETE_MESSAGE + + sentRequestId, sendErr := m.client.sessionHandler.completeSendMessage(actionType, true, payload) + if sendErr != nil { + return nil, sendErr + } + + response, err := m.client.sessionHandler.WaitForResponse(sentRequestId, actionType) + if err != nil { + return nil, err + } + + res, ok := response.Data.Decrypted.(*binary.DeleteMessageResponse) + if !ok { + return nil, fmt.Errorf("failed to assert response into DeleteMessageResponse") + } + + m.client.Logger.Debug().Any("res", res).Msg("deleted message!") + return res, nil +} diff --git a/libgm/metadata/emojis.go b/libgm/metadata/emojis.go new file mode 100644 index 0000000..351288e --- /dev/null +++ b/libgm/metadata/emojis.go @@ -0,0 +1,14 @@ +package metadata + +var Emojis = map[string]int64{ + "\U0001F44D": 1, // 👍 + "\U0001F60D": 2, // 😍 + "\U0001F602": 3, // 😂 + "\U0001F62E": 4, // 😮 + "\U0001F625": 5, // 😥 + "\U0001F622": 10, // 😢 + "\U0001F620": 6, // 😠 + "\U0001F621": 11, // 😡 + "\U0001F44E": 7, // 👎 + "\U00002764": 12, // ❤️ +} diff --git a/libgm/msg_handler.go b/libgm/msg_handler.go deleted file mode 100644 index ac466cd..0000000 --- a/libgm/msg_handler.go +++ /dev/null @@ -1,71 +0,0 @@ -package libgm - -import ( - "encoding/json" - "fmt" - - "go.mau.fi/mautrix-gmessages/libgm/binary" - "go.mau.fi/mautrix-gmessages/libgm/pblite" -) - -func (r *RPC) HandleRPCMsg(msgArr []interface{}) { - /* - if data[0] == 44 { // ',' - data = data[1:] - } - - var msgArr []interface{} - err := r.tryUnmarshalJSON(data, &msgArr) - if err != nil { - r.client.Logger.Error().Err(fmt.Errorf("got invalid json string %s", string(data))).Msg("rpc msg err") - r.HandleByLength(data) - return - } - */ - response := &binary.RPCResponse{} - deserializeErr := pblite.Deserialize(msgArr, response.ProtoReflect()) - if deserializeErr != nil { - r.client.Logger.Error().Err(deserializeErr).Msg("meow") - r.client.Logger.Error().Err(fmt.Errorf("failed to deserialize response %s", msgArr)).Msg("rpc deserialize msg err") - return - } - //r.client.Logger.Debug().Any("byteLength", len(data)).Any("unmarshaled", response).Any("raw", string(data)).Msg("RPC Msg") - if response.Data == nil { - r.client.Logger.Error().Err(fmt.Errorf("Response data was nil %s", msgArr)).Msg("rpc msg data err") - return - } - if response.Data.RoutingOpCode == 19 { - parsedResponse, failedParse := r.client.sessionHandler.NewResponse(response) - if failedParse != nil { - panic(failedParse) - } - //hasBody := parsedResponse.Data.EncryptedData == nil - //r.client.Logger.Info().Any("msgData", parsedResponse).Msg("Got event!") - r.client.sessionHandler.addResponseAck(parsedResponse.ResponseID) - _, waitingForResponse := r.client.sessionHandler.requests[parsedResponse.Data.RequestID] - //log.Println(fmt.Sprintf("%v %v %v %v %v %v %v", parsedResponse.RoutingOpCode, parsedResponse.Data.Opcode, parsedResponse.Data.Sub, parsedResponse.Data.Third, parsedResponse.Data.Field9, hasBody, waitingForResponse)) - //r.client.Logger.Debug().Any("waitingForResponse?", waitingForResponse).Msg("Got rpc response from server") - if parsedResponse.Data.Opcode == 16 || waitingForResponse { - if waitingForResponse { - r.client.sessionHandler.respondToRequestChannel(parsedResponse) - return - } - if parsedResponse.Data.Opcode == 16 { - r.client.handleEventOpCode(parsedResponse) - } - } else { - - } - } else { - r.client.handleSeperateOpCode(response.Data) - } -} - -func (r *RPC) tryUnmarshalJSON(jsonData []byte, msgArr *[]interface{}) error { - err := json.Unmarshal(jsonData, &msgArr) - return err -} - -func (r *RPC) HandleByLength(data []byte) { - r.client.Logger.Debug().Any("byteLength", len(data)).Any("corrupt raw", string(data)).Msg("RPC Corrupt json") -} diff --git a/libgm/opcode_handler.go b/libgm/opcode_handler.go deleted file mode 100644 index 396215b..0000000 --- a/libgm/opcode_handler.go +++ /dev/null @@ -1,47 +0,0 @@ -package libgm - -import ( - "encoding/base64" - - "go.mau.fi/mautrix-gmessages/libgm/binary" -) - -func (c *Client) handleSeperateOpCode(msgData *binary.MessageData) { - decodedBytes, err := base64.StdEncoding.DecodeString(msgData.EncodedData) - if err != nil { - panic(err) - } - switch msgData.RoutingOpCode { - case 14: // paired successful - decodedData := &binary.Container{} - err = binary.DecodeProtoMessage(decodedBytes, decodedData) - if err != nil { - panic(err) - } - if decodedData.UnpairDeviceData != nil { - c.Logger.Warn().Any("data", decodedData).Msg("Unpaired?") - return - } - // TODO unpairing - c.Logger.Debug().Any("data", decodedData).Msg("Paired device decoded data") - if c.pairer != nil { - c.pairer.pairCallback(decodedData) - } else { - c.Logger.Warn().Msg("No pairer to receive callback") - } - default: - decodedData := &binary.EncodedResponse{} - err = binary.DecodeProtoMessage(decodedBytes, decodedData) - if err != nil { - panic(err) - } - if (decodedData.Sub && decodedData.Third != 0) && decodedData.EncryptedData != nil { - bugleData := &binary.BugleBackendService{} - err = c.cryptor.DecryptAndDecodeData(decodedData.EncryptedData, bugleData) - if err != nil { - panic(err) - } - c.handleBugleOpCode(bugleData) - } - } -} diff --git a/libgm/pair.go b/libgm/pair.go index 095577c..52e62ab 100644 --- a/libgm/pair.go +++ b/libgm/pair.go @@ -26,6 +26,7 @@ func (c *Client) NewPairer(keyData *crypto.JWK, refreshQrCodeTime int) (*Pairer, if keyData == nil { var err error keyData, err = crypto.GenerateECDSA_P256_JWK() + c.updateJWK(keyData) if err != nil { c.Logger.Error().Any("data", keyData).Msg(err.Error()) return nil, err @@ -46,7 +47,7 @@ func (p *Pairer) RegisterPhoneRelay() (*binary.RegisterPhoneRelayResponse, error p.client.Logger.Err(err) return &binary.RegisterPhoneRelayResponse{}, err } - //p.client.Logger.Debug().Any("keyByteLength", len(jsonPayload.EcdsaKeysContainer.EcdsaKeys.EncryptedKeys)).Any("json", jsonPayload).Any("base64", body).Msg("RegisterPhoneRelay Payload") + //p.client.Logger.Debug().Any("keyByteLength", len(jsonPayload.GetPairDeviceData().EcdsaKeys.EncryptedKeys)).Any("json", jsonPayload).Any("base64", body).Msg("RegisterPhoneRelay Payload") relayResponse, reqErr := p.client.MakeRelayRequest(util.REGISTER_PHONE_RELAY, body) if reqErr != nil { p.client.Logger.Err(reqErr) @@ -63,6 +64,7 @@ func (p *Pairer) RegisterPhoneRelay() (*binary.RegisterPhoneRelayResponse, error return nil, err3 } p.pairingKey = res.GetPairingKey() + p.client.Logger.Debug().Any("response", res).Msg("Registerphonerelay response") url, qrErr := p.GenerateQRCodeData() if qrErr != nil { return nil, qrErr @@ -86,12 +88,12 @@ func (p *Pairer) startRefreshRelayTask() { } func (p *Pairer) RefreshPhoneRelay() { - body, _, err := payload.RefreshPhoneRelay(p.client.rpcKey) + body, _, err := payload.RefreshPhoneRelay(p.client.authData.TachyonAuthToken) if err != nil { p.client.Logger.Err(err).Msg("refresh phone relay err") return } - //p.client.Logger.Debug().Any("keyByteLength", len(jsonPayload.PhoneRelay.RpcKey)).Any("json", jsonPayload).Any("base64", body).Msg("RefreshPhoneRelay Payload") + //p.client.Logger.Debug().Any("keyByteLength", len(jsonPayload.PhoneRelay.tachyonAuthToken)).Any("json", jsonPayload).Any("base64", body).Msg("RefreshPhoneRelay Payload") relayResponse, reqErr := p.client.MakeRelayRequest(util.REFRESH_PHONE_RELAY, body) if reqErr != nil { p.client.Logger.Err(reqErr).Msg("refresh phone relay err") @@ -116,46 +118,36 @@ func (p *Pairer) RefreshPhoneRelay() { p.client.triggerEvent(&events.QR{URL: url}) } -func (p *Pairer) GetWebEncryptionKey(oldKey []byte) []byte { - body, _, err2 := payload.GetWebEncryptionKey(oldKey) - if err2 != nil { - p.client.Logger.Err(err2).Msg("web encryption key err") - return nil +func (c *Client) GetWebEncryptionKey() (*binary.WebEncryptionKeyResponse, error) { + body, rawData, err1 := payload.GetWebEncryptionKey(c.authData.TachyonAuthToken) + if err1 != nil { + c.Logger.Err(err1).Msg("web encryption key err") + return nil, err1 } - //p.client.Logger.Debug().Any("keyByteLength", len(rawData.PhoneRelay.RpcKey)).Any("json", rawData).Any("base64", body).Msg("GetWebEncryptionKey Payload") - webKeyResponse, reqErr := p.client.MakeRelayRequest(util.GET_WEB_ENCRYPTION_KEY, body) + c.Logger.Debug().Any("keyByteLength", len(rawData.AuthMessage.TachyonAuthToken)).Any("json", rawData).Any("base64", body).Msg("GetWebEncryptionKey Payload") + webKeyResponse, reqErr := c.MakeRelayRequest(util.GET_WEB_ENCRYPTION_KEY, body) if reqErr != nil { - p.client.Logger.Err(reqErr).Msg("Web encryption key request err") + c.Logger.Err(reqErr).Msg("Web encryption key request err") + return nil, reqErr } responseBody, err2 := io.ReadAll(webKeyResponse.Body) defer webKeyResponse.Body.Close() if err2 != nil { - p.client.Logger.Err(err2).Msg("Web encryption key read response err") - return nil + c.Logger.Err(err2).Msg("Web encryption key read response err") + return nil, err2 } //p.client.Logger.Debug().Any("responseLength", len(responseBody)).Any("raw", responseBody).Msg("Response Body Length") parsedResponse := &binary.WebEncryptionKeyResponse{} err2 = binary.DecodeProtoMessage(responseBody, parsedResponse) if err2 != nil { - p.client.Logger.Err(err2).Msg("Parse webkeyresponse into proto struct error") + c.Logger.Err(err2).Msg("Parse webkeyresponse into proto struct error") + return nil, err2 } - p.client.Logger.Debug().Any("parsedResponse", parsedResponse).Msg("WebEncryptionKeyResponse") - if p.ticker != nil { - p.client.Logger.Info().Msg("Reconnecting") - p.ticker.Stop() - reconnectErr := p.client.Reconnect(p.client.rpc.webAuthKey) - if reconnectErr != nil { - panic(reconnectErr) + c.Logger.Debug().Any("webenckeyresponse", parsedResponse).Msg("Web encryption key") + if c.pairer != nil { + if c.pairer.ticker != nil { + c.pairer.ticker.Stop() } } - return parsedResponse.GetKey() -} - -func (p *Pairer) pairCallback(pairData *binary.Container) { - p.client.rpc.webAuthKey = pairData.PairDeviceData.WebAuthKeyData.WebAuthKey - p.client.ttl = pairData.PairDeviceData.WebAuthKeyData.ValidFor - p.client.devicePair = &DevicePair{Mobile: pairData.PairDeviceData.Mobile, Browser: pairData.PairDeviceData.Browser} - p.client.pairer.GetWebEncryptionKey(p.client.rpc.webAuthKey) - p.client.triggerEvent(&events.PairSuccessful{Container: pairData}) - p.client.pairer = nil + return parsedResponse, nil } diff --git a/libgm/pairing_handler.go b/libgm/pairing_handler.go new file mode 100644 index 0000000..236c4e7 --- /dev/null +++ b/libgm/pairing_handler.go @@ -0,0 +1,62 @@ +package libgm + +import ( + "log" + + "go.mau.fi/mautrix-gmessages/libgm/events" + "go.mau.fi/mautrix-gmessages/libgm/pblite" + + "go.mau.fi/mautrix-gmessages/libgm/binary" +) + +func (c *Client) handlePairingEvent(response *pblite.Response) { + pairEventData, ok := response.Data.Decrypted.(*binary.PairEvents) + + if !ok { + c.Logger.Error().Any("pairEventData", pairEventData).Msg("failed to assert response into PairEvents") + return + } + + switch evt := pairEventData.Event.(type) { + case *binary.PairEvents_Paired: + callbackErr := c.pairCallback(evt.Paired) + if callbackErr != nil { + log.Fatal(callbackErr) + } + case *binary.PairEvents_Revoked: + c.Logger.Debug().Any("data", evt).Msg("Revoked Device") + default: + c.Logger.Debug().Any("response", response).Any("evt", evt).Msg("Invalid PairEvents type") + } +} + +func (c *Client) NewDevicePair(mobile, browser *binary.Device) *pblite.DevicePair { + return &pblite.DevicePair{ + Mobile: mobile, + Browser: browser, + } +} + +func (c *Client) pairCallback(data *binary.PairedData) error { + + tokenData := data.GetTokenData() + c.updateTachyonAuthToken(tokenData.GetTachyonAuthToken()) + c.updateTTL(tokenData.GetTTL()) + + devicePair := c.NewDevicePair(data.Mobile, data.Browser) + c.updateDevicePair(devicePair) + + webEncryptionKeyResponse, webErr := c.GetWebEncryptionKey() + if webErr != nil { + return webErr + } + c.updateWebEncryptionKey(webEncryptionKeyResponse.GetKey()) + + c.triggerEvent(&events.PairSuccessful{data}) + + reconnectErr := c.Reconnect() + if reconnectErr != nil { + return reconnectErr + } + return nil +} diff --git a/libgm/payload/config.go b/libgm/payload/config.go new file mode 100644 index 0000000..3fb13c9 --- /dev/null +++ b/libgm/payload/config.go @@ -0,0 +1,22 @@ +package payload + +import ( + "go.mau.fi/mautrix-gmessages/libgm/binary" + "go.mau.fi/mautrix-gmessages/libgm/util" +) + +// 202306220406 +var ConfigMessage = &binary.ConfigVersion{ + V1: 2023, + V2: 7, + V3: 3, + V4: 4, + V5: 6, +} +var Network = "Bugle" +var BrowserDetailsMessage = &binary.BrowserDetails{ + UserAgent: util.USER_AGENT, + BrowserType: util.BROWSER_TYPE, + Os: util.OS, + SomeBool: true, +} diff --git a/libgm/payload/getWebEncryptionKey.go b/libgm/payload/getWebEncryptionKey.go index 7ce5ce5..81afaaf 100644 --- a/libgm/payload/getWebEncryptionKey.go +++ b/libgm/payload/getWebEncryptionKey.go @@ -5,19 +5,13 @@ import ( "go.mau.fi/mautrix-gmessages/libgm/util" ) -func GetWebEncryptionKey(WebPairKey []byte) ([]byte, *binary.Container, error) { +func GetWebEncryptionKey(WebPairKey []byte) ([]byte, *binary.AuthenticationContainer, error) { id := util.RandomUUIDv4() - payload := &binary.Container{ - PhoneRelay: &binary.PhoneRelayBody{ - ID: id, - RpcKey: WebPairKey, - Date: &binary.Date{ - Year: 2023, - Seq1: 6, - Seq2: 22, - Seq3: 4, - Seq4: 6, - }, + payload := &binary.AuthenticationContainer{ + AuthMessage: &binary.AuthenticationMessage{ + RequestID: id, + TachyonAuthToken: WebPairKey, + ConfigVersion: ConfigMessage, }, } encodedPayload, err2 := binary.EncodeProtoMessage(payload) diff --git a/libgm/payload/receiveMessages.go b/libgm/payload/receiveMessages.go index 140c5d6..90d1683 100644 --- a/libgm/payload/receiveMessages.go +++ b/libgm/payload/receiveMessages.go @@ -12,15 +12,9 @@ import ( func ReceiveMessages(rpcKey []byte) ([]byte, string, error) { payload := &binary.ReceiveMessagesRequest{ Auth: &binary.AuthMessage{ - RequestID: uuid.New().String(), - RpcKey: rpcKey, - Date: &binary.Date{ - Year: 2023, - Seq1: 6, - Seq2: 22, - Seq3: 4, - Seq4: 6, - }, + RequestID: uuid.New().String(), + TachyonAuthToken: rpcKey, + ConfigVersion: ConfigMessage, }, Unknown: &binary.ReceiveMessagesRequest_UnknownEmptyObject2{ Unknown: &binary.ReceiveMessagesRequest_UnknownEmptyObject1{}, diff --git a/libgm/payload/refreshPhoneRelay.go b/libgm/payload/refreshPhoneRelay.go index e335083..09de467 100644 --- a/libgm/payload/refreshPhoneRelay.go +++ b/libgm/payload/refreshPhoneRelay.go @@ -5,19 +5,13 @@ import ( "go.mau.fi/mautrix-gmessages/libgm/util" ) -func RefreshPhoneRelay(rpcKey []byte) ([]byte, *binary.Container, error) { - payload := &binary.Container{ - PhoneRelay: &binary.PhoneRelayBody{ - ID: util.RandomUUIDv4(), - Bugle: "Bugle", - RpcKey: rpcKey, - Date: &binary.Date{ - Year: 2023, - Seq1: 6, - Seq2: 22, - Seq3: 4, - Seq4: 6, - }, +func RefreshPhoneRelay(rpcKey []byte) ([]byte, *binary.AuthenticationContainer, error) { + payload := &binary.AuthenticationContainer{ + AuthMessage: &binary.AuthenticationMessage{ + RequestID: util.RandomUUIDv4(), + Network: Network, + TachyonAuthToken: rpcKey, + ConfigVersion: ConfigMessage, }, } encodedPayload, err2 := binary.EncodeProtoMessage(payload) diff --git a/libgm/payload/registerPhoneRelay.go b/libgm/payload/registerPhoneRelay.go index 12a58d1..63c650d 100644 --- a/libgm/payload/registerPhoneRelay.go +++ b/libgm/payload/registerPhoneRelay.go @@ -6,16 +6,46 @@ import ( "go.mau.fi/mautrix-gmessages/libgm/util" ) -func RegisterPhoneRelay(jwk *crypto.JWK) ([]byte, *binary.Container, error) { +func RegisterPhoneRelay(jwk *crypto.JWK) ([]byte, *binary.AuthenticationContainer, error) { id := util.RandomUUIDv4() + + encryptedKeys, encryptErr := uncompressKey(jwk) + if encryptErr != nil { + return nil, nil, encryptErr + } + + payloadData := &binary.AuthenticationContainer{ + AuthMessage: &binary.AuthenticationMessage{ + RequestID: id, + Network: Network, + ConfigVersion: ConfigMessage, + }, + BrowserDetails: BrowserDetailsMessage, + Data: &binary.AuthenticationContainer_KeyData{ + KeyData: &binary.KeyData{ + EcdsaKeys: &binary.ECDSAKeys{ + Field1: 2, + EncryptedKeys: encryptedKeys, + }, + }, + }, + } + encoded, err4 := binary.EncodeProtoMessage(payloadData) + if err4 != nil { + return nil, payloadData, err4 + } + return encoded, payloadData, nil +} + +func uncompressKey(jwk *crypto.JWK) ([]byte, error) { decodedPrivateKey, err2 := jwk.PrivKeyB64Bytes() if err2 != nil { - return nil, nil, err2 + return nil, err2 } jwk.PrivateBytes = decodedPrivateKey uncompressedPublicKey, err3 := jwk.UncompressPubKey() if err3 != nil { - return nil, nil, err3 + return nil, err3 } var emptyByteArray []byte crypto.EncodeValues(&emptyByteArray, crypto.SequenceOne) @@ -27,37 +57,7 @@ func RegisterPhoneRelay(jwk *crypto.JWK) ([]byte, *binary.Container, error) { copiedByteArray = crypto.HelperAppendBytes(copiedByteArray, value) } - var emptyByteArray2 []byte - emptyByteArray2 = crypto.AppendBytes(emptyByteArray2, copiedByteArray[0:]) - - payloadData := &binary.Container{ - PhoneRelay: &binary.PhoneRelayBody{ - ID: id, - Bugle: "Bugle", - Date: &binary.Date{ - Year: 2023, - Seq1: 6, - Seq2: 22, - Seq3: 4, - Seq4: 6, - }, - }, - BrowserDetails: &binary.BrowserDetails{ - UserAgent: util.UserAgent, - SomeInt: 2, - SomeBool: true, - Os: util.OS, - }, - PairDeviceData: &binary.PairDeviceData{ - EcdsaKeys: &binary.ECDSAKeys{ - ProtoVersion: 2, - EncryptedKeys: emptyByteArray2, - }, - }, - } - encoded, err4 := binary.EncodeProtoMessage(payloadData) - if err4 != nil { - return nil, payloadData, err4 - } - return encoded, payloadData, nil + var encryptedKeys []byte + encryptedKeys = crypto.AppendBytes(encryptedKeys, copiedByteArray[0:]) + return encryptedKeys, nil } diff --git a/libgm/payload/registerRefresh.go b/libgm/payload/registerRefresh.go new file mode 100644 index 0000000..5297122 --- /dev/null +++ b/libgm/payload/registerRefresh.go @@ -0,0 +1,35 @@ +package payload + +import ( + "encoding/json" + + "go.mau.fi/mautrix-gmessages/libgm/binary" + "go.mau.fi/mautrix-gmessages/libgm/pblite" +) + +func RegisterRefresh(sig string, requestId string, timestamp int64, browser *binary.Device, tachyonAuthToken []byte) ([]byte, error) { + payload := &binary.RegisterRefreshPayload{ + MessageAuth: &binary.AuthMessage{ + RequestID: requestId, + TachyonAuthToken: tachyonAuthToken, + ConfigVersion: ConfigMessage, + }, + CurrBrowserDevice: browser, + UnixTimestamp: timestamp, + Signature: sig, + EmptyRefreshArr: &binary.EmptyRefreshArr{EmptyArr: &binary.EmptyEmptyArr{}}, + MessageType: 2, // hmm + } + + serialized, serializeErr := pblite.Serialize(payload.ProtoReflect()) + if serializeErr != nil { + return nil, serializeErr + } + + jsonMessage, marshalErr := json.Marshal(serialized) + if marshalErr != nil { + return nil, marshalErr + } + + return jsonMessage, nil +} diff --git a/libgm/payload/sendMessage.go b/libgm/payload/sendMessage.go index b0337bb..f9bf28c 100644 --- a/libgm/payload/sendMessage.go +++ b/libgm/payload/sendMessage.go @@ -1,42 +1,128 @@ package payload -import "go.mau.fi/mautrix-gmessages/libgm/binary" +import ( + "encoding/json" + "fmt" + "log" -func NewMessageData(requestID string, encodedStr string, routingOpCode int64, msgType int64) *binary.MessageData { - return &binary.MessageData{ - RequestID: requestID, - RoutingOpCode: routingOpCode, - EncodedData: encodedStr, - MsgTypeArr: &binary.MsgTypeArr{ + "google.golang.org/protobuf/proto" + + "go.mau.fi/mautrix-gmessages/libgm/binary" + "go.mau.fi/mautrix-gmessages/libgm/crypto" + "go.mau.fi/mautrix-gmessages/libgm/pblite" + "go.mau.fi/mautrix-gmessages/libgm/routes" +) + +type SendMessageBuilder struct { + message *binary.SendMessage + b64Message *binary.SendMessageInternal + + err error +} + +func (sm *SendMessageBuilder) Err() error { + return sm.err +} + +func NewSendMessageBuilder(tachyonAuthToken []byte, pairedDevice *binary.Device, requestId string, sessionId string) *SendMessageBuilder { + return &SendMessageBuilder{ + message: &binary.SendMessage{ + Mobile: pairedDevice, + MessageData: &binary.SendMessageData{ + RequestID: requestId, + }, + MessageAuth: &binary.SendMessageAuth{ + RequestID: requestId, + TachyonAuthToken: tachyonAuthToken, + ConfigVersion: ConfigMessage, + }, EmptyArr: &binary.EmptyArr{}, - MsgType: msgType, + }, + b64Message: &binary.SendMessageInternal{ + RequestID: requestId, + SessionID: sessionId, }, } } -func NewEncodedPayload(requestId string, opCode int64, encryptedData []byte, sessionID string) *binary.EncodedPayload { - return &binary.EncodedPayload{ - RequestID: requestId, - Opcode: opCode, - EncryptedData: encryptedData, - SessionID: sessionID, - } +func (sm *SendMessageBuilder) SetPairedDevice(device *binary.Device) *SendMessageBuilder { + sm.message.Mobile = device + return sm } -func NewAuthData(requestId string, rpcKey []byte, date *binary.Date) *binary.AuthMessage { - return &binary.AuthMessage{ - RequestID: requestId, - RpcKey: rpcKey, - Date: date, - } +func (sm *SendMessageBuilder) setBugleRoute(bugleRoute binary.BugleRoute) *SendMessageBuilder { + sm.message.MessageData.BugleRoute = bugleRoute + return sm } -func NewSendMessage(pairedDevice *binary.Device, messageData *binary.MessageData, authData *binary.AuthMessage, ttl int64) *binary.SendMessage { - return &binary.SendMessage{ - PairedDevice: pairedDevice, - MessageData: messageData, - AuthData: authData, - TTL: ttl, - EmptyArr: &binary.EmptyArr{}, - } +func (sm *SendMessageBuilder) SetRequestId(requestId string) *SendMessageBuilder { + sm.message.MessageAuth.RequestID = requestId + sm.message.MessageData.RequestID = requestId + sm.b64Message.RequestID = requestId + return sm +} + +func (sm *SendMessageBuilder) SetSessionId(sessionId string) *SendMessageBuilder { + sm.b64Message.SessionID = sessionId + return sm +} + +func (sm *SendMessageBuilder) SetRoute(actionType binary.ActionType) *SendMessageBuilder { + action, ok := routes.Routes[actionType] + if !ok { + sm.err = fmt.Errorf("invalid action type") + return sm + } + + sm.setBugleRoute(action.BugleRoute) + sm.setMessageType(action.MessageType) + sm.b64Message.Action = action.Action + return sm +} + +func (sm *SendMessageBuilder) setMessageType(eventType binary.MessageType) *SendMessageBuilder { + sm.message.MessageData.MessageTypeData = &binary.MessageTypeData{ + EmptyArr: &binary.EmptyArr{}, + MessageType: eventType, + } + return sm +} + +func (sm *SendMessageBuilder) SetTTL(ttl int64) *SendMessageBuilder { + sm.message.TTL = ttl + return sm +} + +func (sm *SendMessageBuilder) SetEncryptedProtoMessage(message proto.Message, cryptor *crypto.Cryptor) *SendMessageBuilder { + encryptedBytes, encryptErr := cryptor.EncodeAndEncryptData(message) + if encryptErr != nil { + sm.err = encryptErr + return sm + } + + sm.b64Message.EncryptedProtoData = encryptedBytes + return sm +} + +func (sm *SendMessageBuilder) Build() ([]byte, error) { + if sm.err != nil { + return nil, sm.err + } + encodedMessage, err := proto.Marshal(sm.b64Message) + if err != nil { + return nil, err + } + sm.message.MessageData.ProtobufData = encodedMessage + + messageProtoJSON, serializeErr := pblite.Serialize(sm.message.ProtoReflect()) + if serializeErr != nil { + log.Fatal(serializeErr) + return nil, serializeErr + } + + protoJSONBytes, marshalErr := json.Marshal(messageProtoJSON) + if marshalErr != nil { + return nil, marshalErr + } + return protoJSONBytes, nil } diff --git a/libgm/pblite/deseralize.go b/libgm/pblite/deserialize.go similarity index 94% rename from libgm/pblite/deseralize.go rename to libgm/pblite/deserialize.go index 5e3e3bb..b4dc2d4 100644 --- a/libgm/pblite/deseralize.go +++ b/libgm/pblite/deserialize.go @@ -44,6 +44,10 @@ func Deserialize(data []any, m protoreflect.Message) error { } m.Set(fieldDescriptor, protoreflect.ValueOfBytes(bytes)) + case protoreflect.EnumKind: + num, ok = val.(float64) + expectedKind = "float64" + m.Set(fieldDescriptor, protoreflect.ValueOfEnum(protoreflect.EnumNumber(int32(num)))) case protoreflect.Int32Kind: num, ok = val.(float64) expectedKind = "float64" diff --git a/libgm/pblite/internal.go b/libgm/pblite/internal.go new file mode 100644 index 0000000..a8f1d45 --- /dev/null +++ b/libgm/pblite/internal.go @@ -0,0 +1,124 @@ +package pblite + +import ( + "google.golang.org/protobuf/reflect/protoreflect" + + "go.mau.fi/mautrix-gmessages/libgm/binary" + "go.mau.fi/mautrix-gmessages/libgm/crypto" + "go.mau.fi/mautrix-gmessages/libgm/routes" +) + +type DevicePair struct { + Mobile *binary.Device `json:"mobile,omitempty"` + Browser *binary.Device `json:"browser,omitempty"` +} + +type RequestData struct { + RequestId string `json:"requestId,omitempty"` + Timestamp int64 `json:"timestamp,omitempty"` + Action binary.ActionType `json:"action,omitempty"` + Bool1 bool `json:"bool1,omitempty"` + Bool2 bool `json:"bool2,omitempty"` + EncryptedData []byte `json:"requestData,omitempty"` + Decrypted interface{} `json:"decrypted,omitempty"` + Bool3 bool `json:"bool3,omitempty"` +} + +type Response struct { + ResponseId string `json:"responseId,omitempty"` + BugleRoute binary.BugleRoute `json:"bugleRoute,omitempty"` + StartExecute string `json:"startExecute,omitempty"` + MessageType binary.MessageType `json:"eventType,omitempty"` + FinishExecute string `json:"finishExecute,omitempty"` + MillisecondsTaken string `json:"millisecondsTaken,omitempty"` + Devices *DevicePair `json:"devices,omitempty"` + Data RequestData `json:"data,omitempty"` + SignatureId string `json:"signatureId,omitempty"` + Timestamp string `json:"timestamp"` +} + +func DecodeAndDecryptInternalMessage(data []interface{}, cryptor *crypto.Cryptor) (*Response, error) { + internalMessage := &binary.InternalMessage{} + deserializeErr := Deserialize(data, internalMessage.ProtoReflect()) + if deserializeErr != nil { + return nil, deserializeErr + } + var resp *Response + switch internalMessage.Data.BugleRoute { + case binary.BugleRoute_PairEvent: + decodedData := &binary.PairEvents{} + decodeErr := binary.DecodeProtoMessage(internalMessage.Data.ProtobufData, decodedData) + if decodeErr != nil { + return nil, decodeErr + } + resp = newResponseFromPairEvent(internalMessage.GetData(), decodedData) + case binary.BugleRoute_DataEvent: + internalRequestData := &binary.InternalRequestData{} + decodeErr := binary.DecodeProtoMessage(internalMessage.Data.ProtobufData, internalRequestData) + if decodeErr != nil { + return nil, decodeErr + } + if internalRequestData.EncryptedData != nil { + var decryptedData = routes.Routes[internalRequestData.GetAction()].ResponseStruct.ProtoReflect().New().Interface() + decryptErr := cryptor.DecryptAndDecodeData(internalRequestData.EncryptedData, decryptedData) + if decryptErr != nil { + return nil, decryptErr + } + resp = newResponseFromDataEvent(internalMessage.GetData(), internalRequestData, decryptedData) + } else { + resp = newResponseFromDataEvent(internalMessage.GetData(), internalRequestData, nil) + } + } + return resp, nil +} + +func newResponseFromPairEvent(internalMsg *binary.InternalMessageData, data *binary.PairEvents) *Response { + resp := &Response{ + ResponseId: internalMsg.GetResponseID(), + BugleRoute: internalMsg.GetBugleRoute(), + StartExecute: internalMsg.GetStartExecute(), + MessageType: internalMsg.GetMessageType(), + FinishExecute: internalMsg.GetFinishExecute(), + MillisecondsTaken: internalMsg.GetMillisecondsTaken(), + Devices: &DevicePair{ + Mobile: internalMsg.GetMobile(), + Browser: internalMsg.GetBrowser(), + }, + Data: RequestData{ + Decrypted: data, + }, + Timestamp: internalMsg.GetTimestamp(), + SignatureId: internalMsg.GetSignatureID(), + } + + return resp +} + +func newResponseFromDataEvent(internalMsg *binary.InternalMessageData, internalRequestData *binary.InternalRequestData, decrypted protoreflect.ProtoMessage) *Response { + resp := &Response{ + ResponseId: internalMsg.GetResponseID(), + BugleRoute: internalMsg.GetBugleRoute(), + StartExecute: internalMsg.GetStartExecute(), + MessageType: internalMsg.GetMessageType(), + FinishExecute: internalMsg.GetFinishExecute(), + MillisecondsTaken: internalMsg.GetMillisecondsTaken(), + Devices: &DevicePair{ + Mobile: internalMsg.GetMobile(), + Browser: internalMsg.GetBrowser(), + }, + Data: RequestData{ + RequestId: internalRequestData.GetSessionID(), + Timestamp: internalRequestData.GetTimestamp(), + Action: internalRequestData.GetAction(), + Bool1: internalRequestData.GetBool1(), + Bool2: internalRequestData.GetBool2(), + EncryptedData: internalRequestData.GetEncryptedData(), + Decrypted: decrypted, + Bool3: internalRequestData.GetBool3(), + }, + SignatureId: internalMsg.GetSignatureID(), + Timestamp: internalMsg.GetTimestamp(), + } + + return resp +} diff --git a/libgm/qr.go b/libgm/qr.go index 0ec837e..2eafd52 100644 --- a/libgm/qr.go +++ b/libgm/qr.go @@ -9,9 +9,9 @@ import ( func (p *Pairer) GenerateQRCodeData() (string, error) { urlData := &binary.UrlData{ - PairingKey: p.pairingKey, - AESCTR256Key: p.client.cryptor.AESCTR256Key, - SHA256Key: p.client.cryptor.SHA256Key, + PairingKey: p.pairingKey, + AESKey: p.client.authData.Cryptor.AESKey, + HMACKey: p.client.authData.Cryptor.HMACKey, } encodedUrlData, err := binary.EncodeProtoMessage(urlData) if err != nil { diff --git a/libgm/reaction_builder.go b/libgm/reaction_builder.go new file mode 100644 index 0000000..7b4ae7d --- /dev/null +++ b/libgm/reaction_builder.go @@ -0,0 +1,88 @@ +package libgm + +import ( + "fmt" + + "go.mau.fi/mautrix-gmessages/libgm/binary" + "go.mau.fi/mautrix-gmessages/libgm/metadata" +) + +type ReactionBuilderError struct { + errMsg string +} + +func (rbe *ReactionBuilderError) Error() string { + return fmt.Sprintf("Failed to build reaction builder: %s", rbe.errMsg) +} + +type ReactionBuilder struct { + messageID string + emoji []byte + action binary.Reaction + + emojiType int64 +} + +func (rb *ReactionBuilder) SetAction(action binary.Reaction) *ReactionBuilder { + rb.action = action + return rb +} + +/* +Emoji is a unicode string like "\U0001F44D" or a string like "👍" +*/ +func (rb *ReactionBuilder) SetEmoji(emoji string) *ReactionBuilder { + emojiType, exists := metadata.Emojis[emoji] + if exists { + rb.emojiType = emojiType + } else { + rb.emojiType = 8 + } + + rb.emoji = []byte(emoji) + return rb +} + +func (rb *ReactionBuilder) SetMessageID(messageId string) *ReactionBuilder { + rb.messageID = messageId + return rb +} + +func (rb *ReactionBuilder) Build() (*binary.SendReactionPayload, error) { + if rb.messageID == "" { + return nil, &ReactionBuilderError{ + errMsg: "messageID can not be empty", + } + } + + if rb.action == 0 { + return nil, &ReactionBuilderError{ + errMsg: "action can not be empty", + } + } + + if rb.emojiType == 0 { + return nil, &ReactionBuilderError{ + errMsg: "failed to set emojiType", + } + } + + if rb.emoji == nil { + return nil, &ReactionBuilderError{ + errMsg: "failed to set emoji", + } + } + + return &binary.SendReactionPayload{ + MessageID: rb.messageID, + ReactionData: &binary.ReactionData{ + EmojiUnicode: rb.emoji, + EmojiType: rb.emojiType, + }, + Action: rb.action, + }, nil +} + +func (c *Client) NewReactionBuilder() *ReactionBuilder { + return &ReactionBuilder{} +} diff --git a/libgm/response.go b/libgm/response.go deleted file mode 100644 index 318a735..0000000 --- a/libgm/response.go +++ /dev/null @@ -1,16 +0,0 @@ -package libgm - -import "go.mau.fi/mautrix-gmessages/libgm/binary" - -func (c *Client) newMessagesResponse(responseData *Response) (*binary.FetchMessagesResponse, error) { - messages := &binary.FetchMessagesResponse{} - decryptErr := c.cryptor.DecryptAndDecodeData(responseData.Data.EncryptedData, messages) - if decryptErr != nil { - return nil, decryptErr - } - decryptErr = c.decryptImages(messages) - if decryptErr != nil { - return nil, decryptErr - } - return messages, nil -} diff --git a/libgm/response_handler.go b/libgm/response_handler.go index 6b59a98..bcdbd09 100644 --- a/libgm/response_handler.go +++ b/libgm/response_handler.go @@ -2,99 +2,99 @@ package libgm import ( "fmt" + "log" "sync" + + "go.mau.fi/mautrix-gmessages/libgm/pblite" + + "go.mau.fi/mautrix-gmessages/libgm/binary" + "go.mau.fi/mautrix-gmessages/libgm/routes" ) type ResponseChan struct { - responses []*Response - receivedResponses int64 - wg sync.WaitGroup - mu sync.Mutex + response *pblite.Response + wg sync.WaitGroup + mu sync.Mutex } -func (s *SessionHandler) addRequestToChannel(requestId string, opCode int64) { - instruction, notOk := s.client.instructions.GetInstruction(opCode) +func (s *SessionHandler) addRequestToChannel(requestId string, actionType binary.ActionType) { + _, notOk := routes.Routes[actionType] if !notOk { - panic(notOk) + log.Println("Missing action type: ", actionType) + log.Fatal(notOk) } if msgMap, ok := s.requests[requestId]; ok { responseChan := &ResponseChan{ - responses: make([]*Response, 0, instruction.ExpectedResponses), - receivedResponses: 0, - wg: sync.WaitGroup{}, - mu: sync.Mutex{}, + response: &pblite.Response{}, + wg: sync.WaitGroup{}, + mu: sync.Mutex{}, } - msgMap[opCode] = responseChan - responseChan.wg.Add(int(instruction.ExpectedResponses)) + responseChan.wg.Add(1) responseChan.mu.Lock() + msgMap[actionType] = responseChan } else { - s.requests[requestId] = make(map[int64]*ResponseChan) + s.requests[requestId] = make(map[binary.ActionType]*ResponseChan) responseChan := &ResponseChan{ - responses: make([]*Response, 0, instruction.ExpectedResponses), - receivedResponses: 0, - wg: sync.WaitGroup{}, - mu: sync.Mutex{}, + response: &pblite.Response{}, + wg: sync.WaitGroup{}, + mu: sync.Mutex{}, } - s.requests[requestId][opCode] = responseChan - responseChan.wg.Add(int(instruction.ExpectedResponses)) + responseChan.wg.Add(1) responseChan.mu.Lock() + s.requests[requestId][actionType] = responseChan } } -func (s *SessionHandler) respondToRequestChannel(res *Response) { - requestId := res.Data.RequestID +func (s *SessionHandler) respondToRequestChannel(res *pblite.Response) { + requestId := res.Data.RequestId reqChannel, ok := s.requests[requestId] + actionType := res.Data.Action if !ok { + s.client.Logger.Debug().Any("actionType", actionType).Any("requestId", requestId).Msg("Did not expect response for this requestId") return } - opCodeResponseChan, ok2 := reqChannel[res.Data.Opcode] + actionResponseChan, ok2 := reqChannel[actionType] if !ok2 { + s.client.Logger.Debug().Any("actionType", actionType).Any("requestId", requestId).Msg("Did not expect response for this actionType") return } - - opCodeResponseChan.mu.Lock() - - opCodeResponseChan.responses = append(opCodeResponseChan.responses, res) - - s.client.Logger.Debug().Any("opcode", res.Data.Opcode).Msg("Got response") - - instruction, ok3 := s.client.instructions.GetInstruction(res.Data.Opcode) - if opCodeResponseChan.receivedResponses >= instruction.ExpectedResponses { - s.client.Logger.Debug().Any("opcode", res.Data.Opcode).Msg("Ignoring opcode") + actionResponseChan.mu.Lock() + actionResponseChan, ok2 = reqChannel[actionType] + if !ok2 { + s.client.Logger.Debug().Any("actionType", actionType).Any("requestId", requestId).Msg("Ignoring request for action...") return } - opCodeResponseChan.receivedResponses++ - opCodeResponseChan.wg.Done() - if !ok3 { - panic(ok3) - opCodeResponseChan.mu.Unlock() - return - } - if opCodeResponseChan.receivedResponses >= instruction.ExpectedResponses { - delete(reqChannel, res.Data.Opcode) - if len(reqChannel) == 0 { - delete(s.requests, requestId) - } + s.client.Logger.Debug().Any("actionType", actionType).Any("requestId", requestId).Msg("responding to request") + actionResponseChan.response = res + actionResponseChan.wg.Done() + + delete(reqChannel, actionType) + if len(reqChannel) == 0 { + delete(s.requests, requestId) } - opCodeResponseChan.mu.Unlock() + actionResponseChan.mu.Unlock() } -func (s *SessionHandler) WaitForResponse(requestId string, opCode int64) ([]*Response, error) { +func (s *SessionHandler) WaitForResponse(requestId string, actionType binary.ActionType) (*pblite.Response, error) { requestResponses, ok := s.requests[requestId] if !ok { - return nil, fmt.Errorf("no response channel found for request ID: %s (opcode: %v)", requestId, opCode) - } - responseChan, ok2 := requestResponses[opCode] - if !ok2 { - return nil, fmt.Errorf("no response channel found for opCode: %v (requestId: %s)", opCode, requestId) + return nil, fmt.Errorf("no response channel found for request ID: %s (actionType: %v)", requestId, actionType) + } + + routeInfo, notFound := routes.Routes[actionType] + if !notFound { + return nil, fmt.Errorf("no action exists for actionType: %v (requestId: %s)", actionType, requestId) + } + + responseChan, ok2 := requestResponses[routeInfo.Action] + if !ok2 { + return nil, fmt.Errorf("no response channel found for actionType: %v (requestId: %s)", routeInfo.Action, requestId) } - // Unlock so responses can be received responseChan.mu.Unlock() - // Wait for all responses to be received responseChan.wg.Wait() - return responseChan.responses, nil + return responseChan.response, nil } diff --git a/libgm/routes/conversations.go b/libgm/routes/conversations.go new file mode 100644 index 0000000..6f78cc5 --- /dev/null +++ b/libgm/routes/conversations.go @@ -0,0 +1,30 @@ +package routes + +import "go.mau.fi/mautrix-gmessages/libgm/binary" + +var LIST_CONVERSATIONS_WITH_UPDATES = Route{ + Action: binary.ActionType_LIST_CONVERSATIONS, + MessageType: binary.MessageType_BUGLE_ANNOTATION, + BugleRoute: binary.BugleRoute_DataEvent, + ResponseStruct: &binary.Conversations{}, + UseSessionID: false, + UseTTL: true, +} + +var LIST_CONVERSATIONS = Route{ + Action: binary.ActionType_LIST_CONVERSATIONS, + MessageType: binary.MessageType_BUGLE_MESSAGE, + BugleRoute: binary.BugleRoute_DataEvent, + ResponseStruct: &binary.Conversations{}, + UseSessionID: false, + UseTTL: true, +} + +var GET_CONVERSATION_TYPE = Route{ + Action: binary.ActionType_GET_CONVERSATION_TYPE, + MessageType: binary.MessageType_BUGLE_MESSAGE, + BugleRoute: binary.BugleRoute_DataEvent, + ResponseStruct: &binary.GetConversationTypeResponse{}, + UseSessionID: false, + UseTTL: true, +} diff --git a/libgm/routes/mapped.go b/libgm/routes/mapped.go new file mode 100644 index 0000000..d0d8e41 --- /dev/null +++ b/libgm/routes/mapped.go @@ -0,0 +1,29 @@ +package routes + +import ( + "google.golang.org/protobuf/proto" + + "go.mau.fi/mautrix-gmessages/libgm/binary" +) + +type Route struct { + Action binary.ActionType + MessageType binary.MessageType + BugleRoute binary.BugleRoute + ResponseStruct proto.Message + UseSessionID bool + UseTTL bool +} + +var Routes = map[binary.ActionType]Route{ + binary.ActionType_IS_BUGLE_DEFAULT: IS_BUGLE_DEFAULT, + binary.ActionType_GET_UPDATES: GET_UPDATES, + binary.ActionType_LIST_CONVERSATIONS: LIST_CONVERSATIONS, + binary.ActionType_LIST_CONVERSATIONS_SYNC: LIST_CONVERSATIONS_WITH_UPDATES, + binary.ActionType_NOTIFY_DITTO_ACTIVITY: NOTIFY_DITTO_ACTIVITY, + binary.ActionType_GET_CONVERSATION_TYPE: GET_CONVERSATION_TYPE, + binary.ActionType_LIST_MESSAGES: LIST_MESSAGES, + binary.ActionType_SEND_MESSAGE: SEND_MESSAGE, + binary.ActionType_SEND_REACTION: SEND_REACTION, + binary.ActionType_DELETE_MESSAGE: DELETE_MESSAGE, +} diff --git a/libgm/routes/messages.go b/libgm/routes/messages.go new file mode 100644 index 0000000..6314a46 --- /dev/null +++ b/libgm/routes/messages.go @@ -0,0 +1,39 @@ +package routes + +import "go.mau.fi/mautrix-gmessages/libgm/binary" + +var LIST_MESSAGES = Route{ + Action: binary.ActionType_LIST_MESSAGES, + MessageType: binary.MessageType_BUGLE_MESSAGE, + BugleRoute: binary.BugleRoute_DataEvent, + ResponseStruct: &binary.FetchMessagesResponse{}, + UseSessionID: false, + UseTTL: true, +} + +var SEND_MESSAGE = Route{ + Action: binary.ActionType_SEND_MESSAGE, + MessageType: binary.MessageType_BUGLE_MESSAGE, + BugleRoute: binary.BugleRoute_DataEvent, + ResponseStruct: &binary.SendMessageResponse{}, + UseSessionID: false, + UseTTL: true, +} + +var SEND_REACTION = Route{ + Action: binary.ActionType_SEND_REACTION, + MessageType: binary.MessageType_BUGLE_MESSAGE, + BugleRoute: binary.BugleRoute_DataEvent, + ResponseStruct: &binary.SendReactionResponse{}, + UseSessionID: false, + UseTTL: true, +} + +var DELETE_MESSAGE = Route{ + Action: binary.ActionType_DELETE_MESSAGE, + MessageType: binary.MessageType_BUGLE_MESSAGE, + BugleRoute: binary.BugleRoute_DataEvent, + ResponseStruct: &binary.DeleteMessageResponse{}, + UseSessionID: false, + UseTTL: true, +} diff --git a/libgm/routes/session.go b/libgm/routes/session.go new file mode 100644 index 0000000..b1a4560 --- /dev/null +++ b/libgm/routes/session.go @@ -0,0 +1,30 @@ +package routes + +import "go.mau.fi/mautrix-gmessages/libgm/binary" + +var IS_BUGLE_DEFAULT = Route{ + Action: binary.ActionType_IS_BUGLE_DEFAULT, + MessageType: binary.MessageType_BUGLE_MESSAGE, + BugleRoute: binary.BugleRoute_DataEvent, + ResponseStruct: &binary.IsBugleDefaultResponse{}, + UseSessionID: false, + UseTTL: true, +} + +var GET_UPDATES = Route{ + Action: binary.ActionType_GET_UPDATES, + MessageType: binary.MessageType_BUGLE_MESSAGE, + BugleRoute: binary.BugleRoute_DataEvent, + ResponseStruct: &binary.UpdateEvents{}, + UseSessionID: true, + UseTTL: false, +} + +var NOTIFY_DITTO_ACTIVITY = Route{ + Action: binary.ActionType_NOTIFY_DITTO_ACTIVITY, + MessageType: binary.MessageType_BUGLE_MESSAGE, + BugleRoute: binary.BugleRoute_DataEvent, + ResponseStruct: nil, + UseSessionID: false, + UseTTL: true, +} diff --git a/libgm/rpc.go b/libgm/rpc.go index 1b97617..7831a1b 100644 --- a/libgm/rpc.go +++ b/libgm/rpc.go @@ -3,14 +3,19 @@ package libgm import ( "bufio" "bytes" + "encoding/json" "errors" "fmt" "io" + "log" "net/http" "os" "time" "go.mau.fi/mautrix-gmessages/libgm/events" + "go.mau.fi/mautrix-gmessages/libgm/pblite" + + "go.mau.fi/mautrix-gmessages/libgm/binary" "go.mau.fi/mautrix-gmessages/libgm/util" ) @@ -18,8 +23,7 @@ type RPC struct { client *Client http *http.Client conn io.ReadCloser - rpcSessionID string - webAuthKey []byte + rpcSessionId string listenID int } @@ -92,7 +96,11 @@ func (r *RPC) startReadingData(rc io.ReadCloser) { return } chunk := buf[:n] - if n <= 25 { + if n <= 25 { // this will catch the acknowledgement message unless you are required to ack 1000 messages for some reason + isAck := r.isAcknowledgeMessage(chunk) + if isAck { + r.client.Logger.Info().Any("isAck", isAck).Msg("Got Ack Message") + } isHeartBeat := r.isHeartBeat(chunk) if isHeartBeat { r.client.Logger.Info().Any("heartBeat", isHeartBeat).Msg("Got heartbeat message") @@ -117,11 +125,46 @@ func (r *RPC) startReadingData(rc io.ReadCloser) { } accumulatedData = []byte{} - r.client.Logger.Info().Any("val", msgArr).Msg("MsgArr") + //r.client.Logger.Info().Any("val", msgArr).Msg("MsgArr") go r.HandleRPCMsg(msgArr) } } +func (r *RPC) isAcknowledgeMessage(data []byte) bool { + if data[0] == 44 { + return false + } + if len(data) >= 3 && data[0] == 91 && data[1] == 91 && data[2] == 91 { + parsed, parseErr := r.parseAckMessage(data) + if parseErr != nil { + log.Fatal(parseErr) + } + skipCount = parsed.Container.Data.GetAckAmount().Count + r.client.Logger.Info().Any("count", skipCount).Msg("Messages To Skip") + } else { + return false + } + return true +} + +func (r *RPC) parseAckMessage(data []byte) (*binary.AckMessageResponse, error) { + data = append(data, 93) + data = append(data, 93) + + var msgArr []interface{} + marshalErr := json.Unmarshal(data, &msgArr) + if marshalErr != nil { + return nil, marshalErr + } + + msg := &binary.AckMessageResponse{} + deserializeErr := pblite.Deserialize(msgArr, msg.ProtoReflect()) + if deserializeErr != nil { + return nil, deserializeErr + } + return msg, nil +} + func (r *RPC) isStartRead(data []byte) bool { return string(data) == "[[[null,null,null,[]]" } @@ -130,34 +173,8 @@ func (r *RPC) isHeartBeat(data []byte) bool { return string(data) == ",[null,null,[]]" } -/* -func (r *RPC) startReadingData(rc io.ReadCloser) { - defer rc.Close() - reader := bufio.NewReader(rc) - buf := make([]byte, 5242880) - for { - n, err := reader.Read(buf) - if err != nil { - if errors.Is(err, os.ErrClosed) { - r.client.Logger.Err(err).Msg("Closed body from server") - r.conn = nil - return - } - r.client.Logger.Err(err).Msg("Stopped reading data from server") - return - } - chunk := buf[:n] - var msgArr []interface{} - isComplete := r.tryUnmarshalJSON(chunk, &msgArr) - r.client.Logger.Info().Any("val", chunk[0] == 44).Any("isComplete", string(chunk)).Msg("is Start?") - go r.HandleRPCMsg(buf[:n]) - } -} -*/ - func (r *RPC) CloseConnection() { if r.conn != nil { - r.listenID++ r.client.Logger.Debug().Msg("Attempting to connection...") r.conn.Close() r.conn = nil @@ -167,30 +184,13 @@ func (r *RPC) CloseConnection() { func (r *RPC) sendMessageRequest(url string, payload []byte) (*http.Response, error) { req, err := http.NewRequest("POST", url, bytes.NewReader(payload)) if err != nil { - panic(fmt.Errorf("Error creating request: %v", err)) + log.Fatalf("Error creating request: %v", err) } util.BuildRelayHeaders(req, "application/json+protobuf", "*/*") resp, reqErr := r.client.http.Do(req) //r.client.Logger.Info().Any("bodyLength", len(payload)).Any("url", url).Any("headers", resp.Request.Header).Msg("RPC Request Headers") if reqErr != nil { - panic(fmt.Errorf("Error making request: %v", err)) + log.Fatalf("Error making request: %v", err) } return resp, reqErr } - -func (r *RPC) sendInitialData() error { - sessionResponse, err := r.client.Session.SetActiveSession() - if err != nil { - return err - } - - _, convErr := r.client.Conversations.List(25) - if convErr != nil { - return convErr - } - - evtData := events.NewClientReady(sessionResponse) - r.client.triggerEvent(evtData) - r.client.sessionHandler.startAckInterval() - return nil -} diff --git a/libgm/session.go b/libgm/session.go index 0717481..3ffd2e0 100644 --- a/libgm/session.go +++ b/libgm/session.go @@ -1,65 +1,62 @@ package libgm -import "go.mau.fi/mautrix-gmessages/libgm/util" +import ( + "fmt" + + "go.mau.fi/mautrix-gmessages/libgm/binary" +) type Session struct { client *Client - - prepareNewSession prepareNewSession - newSession newSession } -func (s *Session) SetActiveSession() (*util.SessionResponse, error) { - s.client.sessionHandler.ResetSessionID() +// start receiving updates from mobile on this session +func (s *Session) SetActiveSession() error { + s.client.sessionHandler.ResetSessionId() - prepareResponses, prepareSessionErr := s.prepareNewSession.Execute() - if prepareSessionErr != nil { - return nil, prepareSessionErr + actionType := binary.ActionType_GET_UPDATES + _, sendErr := s.client.sessionHandler.completeSendMessage(actionType, false, nil) + if sendErr != nil { + return sendErr } - - newSessionResponses, newSessionErr := s.newSession.Execute() - if newSessionErr != nil { - return nil, newSessionErr - } - - sessionResponse, processFail := s.client.processSessionResponse(prepareResponses, newSessionResponses) - if processFail != nil { - return nil, processFail - } - - return sessionResponse, nil + return nil } -type prepareNewSession struct { - client *Client -} +func (s *Session) IsBugleDefault() (*binary.IsBugleDefaultResponse, error) { + s.client.sessionHandler.ResetSessionId() -func (p *prepareNewSession) Execute() ([]*Response, error) { - instruction, _ := p.client.instructions.GetInstruction(PREPARE_NEW_SESSION_OPCODE) - sentRequestID, _ := p.client.createAndSendRequest(instruction.Opcode, p.client.ttl, false, nil) + actionType := binary.ActionType_IS_BUGLE_DEFAULT + sentRequestId, sendErr := s.client.sessionHandler.completeSendMessage(actionType, true, nil) + if sendErr != nil { + return nil, sendErr + } - responses, err := p.client.sessionHandler.WaitForResponse(sentRequestID, instruction.Opcode) + response, err := s.client.sessionHandler.WaitForResponse(sentRequestId, actionType) if err != nil { return nil, err } - return responses, nil -} - -type newSession struct { - client *Client -} - -func (n *newSession) Execute() ([]*Response, error) { - instruction, _ := n.client.instructions.GetInstruction(NEW_SESSION_OPCODE) - sentRequestID, _ := n.client.createAndSendRequest(instruction.Opcode, 0, true, nil) - - responses, err := n.client.sessionHandler.WaitForResponse(sentRequestID, instruction.Opcode) - if err != nil { - return nil, err + res, ok := response.Data.Decrypted.(*binary.IsBugleDefaultResponse) + if !ok { + return nil, fmt.Errorf("failed to assert response into IsBugleDefaultResponse") } - // Rest of the processing... - - return responses, nil + return res, nil +} + +func (s *Session) NotifyDittoActivity() error { + payload := &binary.NotifyDittoActivityPayload{Success: true} + actionType := binary.ActionType_NOTIFY_DITTO_ACTIVITY + + sentRequestId, sendErr := s.client.sessionHandler.completeSendMessage(actionType, true, payload) + if sendErr != nil { + return sendErr + } + + _, err := s.client.sessionHandler.WaitForResponse(sentRequestId, actionType) + if err != nil { + return err + } + + return nil } diff --git a/libgm/session_handler.go b/libgm/session_handler.go index d13745e..b48fa30 100644 --- a/libgm/session_handler.go +++ b/libgm/session_handler.go @@ -3,38 +3,41 @@ package libgm import ( "encoding/json" "fmt" + "log" "time" "golang.org/x/exp/slices" "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" + + "go.mau.fi/mautrix-gmessages/libgm/pblite" "go.mau.fi/mautrix-gmessages/libgm/binary" - "go.mau.fi/mautrix-gmessages/libgm/crypto" "go.mau.fi/mautrix-gmessages/libgm/payload" - "go.mau.fi/mautrix-gmessages/libgm/pblite" + "go.mau.fi/mautrix-gmessages/libgm/routes" "go.mau.fi/mautrix-gmessages/libgm/util" ) +/* type Response struct { - client *Client - ResponseID string + client *Client + ResponseId string RoutingOpCode int64 - Data *binary.EncodedResponse // base64 encoded (decode -> protomessage) + Data *binary.EncodedResponse // base64 encoded (decode -> protomessage) - StartExecute string + StartExecute string FinishExecute string - DevicePair *DevicePair + DevicePair *pblite.DevicePair } +*/ type SessionHandler struct { client *Client - requests map[string]map[int64]*ResponseChan + requests map[string]map[binary.ActionType]*ResponseChan ackMap []string ackTicker *time.Ticker - sessionID string + sessionId string responseTimeout time.Duration } @@ -43,74 +46,63 @@ func (s *SessionHandler) SetResponseTimeout(milliSeconds int) { s.responseTimeout = time.Duration(milliSeconds) * time.Millisecond } -func (s *SessionHandler) ResetSessionID() { - s.sessionID = util.RandomUUIDv4() +func (s *SessionHandler) ResetSessionId() { + s.sessionId = util.RandomUUIDv4() } -func (c *Client) createAndSendRequest(instructionId int64, ttl int64, newSession bool, encryptedProtoMessage protoreflect.Message) (string, error) { - requestId := util.RandomUUIDv4() - instruction, ok := c.instructions.GetInstruction(instructionId) - if !ok { - return "", fmt.Errorf("failed to get instruction: %v does not exist", instructionId) +func (s *SessionHandler) completeSendMessage(actionType binary.ActionType, addToChannel bool, encryptedData proto.Message) (string, error) { + requestId, payload, action, buildErr := s.buildMessage(actionType, encryptedData) + if buildErr != nil { + return "", buildErr } - if newSession { - requestId = c.sessionHandler.sessionID + if addToChannel { + s.addRequestToChannel(requestId, action) } - - var encryptedData []byte - var encryptErr error - if encryptedProtoMessage != nil { - encryptedData, encryptErr = c.EncryptPayloadData(encryptedProtoMessage) - if encryptErr != nil { - return "", fmt.Errorf("failed to encrypt payload data for opcode: %v", instructionId) - } - c.Logger.Info().Any("encryptedData", encryptedData).Msg("Sending request with encrypted data") - } - - encodedData := payload.NewEncodedPayload(requestId, instruction.Opcode, encryptedData, c.sessionHandler.sessionID) - encodedStr, encodeErr := crypto.EncodeProtoB64(encodedData) - if encodeErr != nil { - panic(fmt.Errorf("Failed to encode data: %w", encodeErr)) - } - messageData := payload.NewMessageData(requestId, encodedStr, instruction.RoutingOpCode, instruction.MsgType) - authMessage := payload.NewAuthData(requestId, c.rpcKey, &binary.Date{Year: 2023, Seq1: 6, Seq2: 22, Seq3: 4, Seq4: 6}) - sendMessage := payload.NewSendMessage(c.devicePair.Mobile, messageData, authMessage, ttl) - - sentRequestID, reqErr := c.sessionHandler.completeSendMessage(encodedData.RequestID, instruction.Opcode, sendMessage) - if reqErr != nil { - return "", fmt.Errorf("failed to send message request for opcode: %v", instructionId) - } - return sentRequestID, nil -} - -func (s *SessionHandler) completeSendMessage(requestId string, opCode int64, msg *binary.SendMessage) (string, error) { - jsonData, err := s.toJSON(msg.ProtoReflect()) - if err != nil { - return "", err - } - //s.client.Logger.Debug().Any("payload", string(jsonData)).Msg("Sending message request") - s.addRequestToChannel(requestId, opCode) - _, reqErr := s.client.rpc.sendMessageRequest(util.SEND_MESSAGE, jsonData) + _, reqErr := s.client.rpc.sendMessageRequest(util.SEND_MESSAGE, payload) if reqErr != nil { return "", reqErr } return requestId, nil } -func (s *SessionHandler) toJSON(message protoreflect.Message) ([]byte, error) { - interfaceArr, err := pblite.Serialize(message) - if err != nil { - return nil, err +func (s *SessionHandler) buildMessage(actionType binary.ActionType, encryptedData proto.Message) (string, []byte, binary.ActionType, error) { + var requestId string + pairedDevice := s.client.authData.DevicePair.Mobile + sessionId := s.client.sessionHandler.sessionId + token := s.client.authData.TachyonAuthToken + + routeInfo, ok := routes.Routes[actionType] + if !ok { + return "", nil, 0, fmt.Errorf("failed to build message: could not find route %d", actionType) } - jsonData, jsonErr := json.Marshal(interfaceArr) - if jsonErr != nil { - return nil, jsonErr + + if routeInfo.UseSessionID { + requestId = s.sessionId + } else { + requestId = util.RandomUUIDv4() } - return jsonData, nil + + tmpMessage := payload.NewSendMessageBuilder(token, pairedDevice, requestId, sessionId).SetRoute(routeInfo.Action).SetSessionId(s.sessionId) + + if encryptedData != nil { + tmpMessage.SetEncryptedProtoMessage(encryptedData, s.client.authData.Cryptor) + } + + if routeInfo.UseTTL { + tmpMessage.SetTTL(s.client.authData.TTL) + } + + message, buildErr := tmpMessage.Build() + if buildErr != nil { + return "", nil, 0, buildErr + } + + return requestId, message, routeInfo.Action, nil } func (s *SessionHandler) addResponseAck(responseId string) { + s.client.Logger.Debug().Any("responseId", responseId).Msg("Added to ack map") hasResponseId := slices.Contains(s.ackMap, responseId) if !hasResponseId { s.ackMap = append(s.ackMap, responseId) @@ -137,23 +129,23 @@ func (s *SessionHandler) sendAckRequest() { reqId := util.RandomUUIDv4() ackMessagePayload := &binary.AckMessagePayload{ AuthData: &binary.AuthMessage{ - RequestID: reqId, - RpcKey: s.client.rpcKey, - Date: &binary.Date{Year: 2023, Seq1: 6, Seq2: 22, Seq3: 4, Seq4: 6}, + RequestID: reqId, + TachyonAuthToken: s.client.authData.TachyonAuthToken, + ConfigVersion: payload.ConfigMessage, }, EmptyArr: &binary.EmptyArr{}, NoClue: nil, } dataArray, err := pblite.Serialize(ackMessagePayload.ProtoReflect()) if err != nil { - panic(err) + log.Fatal(err) } ackMessages := make([][]interface{}, 0) for _, reqId := range s.ackMap { - ackMessageData := &binary.AckMessageData{RequestID: reqId, Device: s.client.devicePair.Browser} + ackMessageData := &binary.AckMessageData{RequestID: reqId, Device: s.client.authData.DevicePair.Browser} ackMessageDataArr, err := pblite.Serialize(ackMessageData.ProtoReflect()) if err != nil { - panic(err) + log.Fatal(err) } ackMessages = append(ackMessages, ackMessageDataArr) s.ackMap = util.RemoveFromSlice(s.ackMap, reqId) @@ -161,55 +153,11 @@ func (s *SessionHandler) sendAckRequest() { dataArray = append(dataArray, ackMessages) jsonData, jsonErr := json.Marshal(dataArray) if jsonErr != nil { - panic(err) + log.Fatal(err) } _, err = s.client.rpc.sendMessageRequest(util.ACK_MESSAGES, jsonData) if err != nil { - panic(err) + log.Fatal(err) } - s.client.Logger.Debug().Msg("[ACK] Sent Request") -} - -func (s *SessionHandler) NewResponse(response *binary.RPCResponse) (*Response, error) { - //s.client.Logger.Debug().Any("rpcResponse", response).Msg("Raw rpc response") - decodedData, err := crypto.DecodeEncodedResponse(response.Data.EncodedData) - if err != nil { - panic(err) - return nil, err - } - return &Response{ - client: s.client, - ResponseID: response.Data.RequestID, - RoutingOpCode: response.Data.RoutingOpCode, - StartExecute: response.Data.Ts1, - FinishExecute: response.Data.Ts2, - DevicePair: &DevicePair{ - Mobile: response.Data.Mobile, - Browser: response.Data.Browser, - }, - Data: decodedData, - }, nil -} - -func (r *Response) decryptData() (proto.Message, error) { - if r.Data.EncryptedData != nil { - instruction, ok := r.client.instructions.GetInstruction(r.Data.Opcode) - if !ok { - return nil, fmt.Errorf("failed to decrypt data for unknown opcode: %v", r.Data.Opcode) - } - decryptedBytes, errDecrypt := instruction.cryptor.Decrypt(r.Data.EncryptedData) - if errDecrypt != nil { - return nil, errDecrypt - } - //os.WriteFile("opcode_"+strconv.Itoa(int(instruction.Opcode))+".bin", decryptedBytes, os.ModePerm) - - protoMessageData := instruction.DecryptedProtoMessage.ProtoReflect().Type().New().Interface() - decodeProtoErr := binary.DecodeProtoMessage(decryptedBytes, protoMessageData) - if decodeProtoErr != nil { - return nil, decodeProtoErr - } - - return protoMessageData, nil - } - return nil, fmt.Errorf("no encrypted data to decrypt for requestID: %s", r.Data.RequestID) + s.client.Logger.Debug().Any("payload", jsonData).Msg("[ACK] Sent Request") } diff --git a/libgm/settings_handler.go b/libgm/settings_handler.go new file mode 100644 index 0000000..6dd4d0a --- /dev/null +++ b/libgm/settings_handler.go @@ -0,0 +1,13 @@ +package libgm + +import ( + "go.mau.fi/mautrix-gmessages/libgm/pblite" + + "go.mau.fi/mautrix-gmessages/libgm/binary" + "go.mau.fi/mautrix-gmessages/libgm/events" +) + +func (c *Client) handleSettingsEvent(res *pblite.Response, data *binary.Settings) { + evt := events.NewSettingsUpdated(data) + c.triggerEvent(evt) +} diff --git a/libgm/typing_handler.go b/libgm/typing_handler.go new file mode 100644 index 0000000..7d4aebd --- /dev/null +++ b/libgm/typing_handler.go @@ -0,0 +1,26 @@ +package libgm + +import ( + "go.mau.fi/mautrix-gmessages/libgm/pblite" + + "go.mau.fi/mautrix-gmessages/libgm/binary" + "go.mau.fi/mautrix-gmessages/libgm/events" +) + +func (c *Client) handleTypingEvent(res *pblite.Response, data *binary.TypingData) { + typingType := data.Type + + var evt events.TypingEvent + switch typingType { + case binary.TypingTypes_STARTED_TYPING: + evt = events.NewStartedTyping(data) + case binary.TypingTypes_STOPPED_TYPING: + evt = events.NewStoppedTyping(data) + default: + c.Logger.Debug().Any("data", data).Msg("got unknown TypingData evt") + } + + if evt != nil { + c.triggerEvent(evt) + } +} diff --git a/libgm/updates_handler.go b/libgm/updates_handler.go new file mode 100644 index 0000000..03c252a --- /dev/null +++ b/libgm/updates_handler.go @@ -0,0 +1,40 @@ +package libgm + +import ( + "go.mau.fi/mautrix-gmessages/libgm/pblite" + + "go.mau.fi/mautrix-gmessages/libgm/binary" +) + +func (c *Client) handleUpdatesEvent(res *pblite.Response) { + switch res.Data.Action { + case binary.ActionType_GET_UPDATES: + data, ok := res.Data.Decrypted.(*binary.UpdateEvents) + if !ok { + c.Logger.Error().Any("res", res).Msg("failed to assert ActionType_GET_UPDATES event into UpdateEvents") + return + } + + switch evt := data.Event.(type) { + case *binary.UpdateEvents_UserAlertEvent: + c.handleUserAlertEvent(res, evt.UserAlertEvent) + + case *binary.UpdateEvents_SettingsEvent: + c.handleSettingsEvent(res, evt.SettingsEvent) + + case *binary.UpdateEvents_ConversationEvent: + c.handleConversationEvent(res, evt.ConversationEvent.GetData()) + + case *binary.UpdateEvents_MessageEvent: + c.handleMessageEvent(res, evt.MessageEvent.GetData()) + + case *binary.UpdateEvents_TypingEvent: + c.handleTypingEvent(res, evt.TypingEvent.GetData()) + default: + c.Logger.Debug().Any("evt", evt).Any("res", res).Msg("Got unknown event type") + } + + default: + c.Logger.Error().Any("response", res).Msg("ignoring response.") + } +} diff --git a/libgm/useralert_handler.go b/libgm/useralert_handler.go new file mode 100644 index 0000000..69fa73c --- /dev/null +++ b/libgm/useralert_handler.go @@ -0,0 +1,59 @@ +package libgm + +import ( + "log" + + "go.mau.fi/mautrix-gmessages/libgm/pblite" + + "go.mau.fi/mautrix-gmessages/libgm/binary" + "go.mau.fi/mautrix-gmessages/libgm/events" +) + +func (c *Client) handleUserAlertEvent(res *pblite.Response, data *binary.UserAlertEvent) { + alertType := data.AlertType + switch alertType { + case binary.AlertType_BROWSER_ACTIVE: + newSessionId := res.Data.RequestId + c.Logger.Info().Any("sessionId", newSessionId).Msg("[NEW_BROWSER_ACTIVE] Opened new browser connection") + if newSessionId != c.sessionHandler.sessionId { + evt := events.NewBrowserActive(newSessionId) + c.triggerEvent(evt) + } else { + c.Logger.Info().Any("sessionId", newSessionId).Msg("Client is ready!") + conversations, convErr := c.Conversations.List(25) + if convErr != nil { + log.Fatal(convErr) + } + c.Logger.Debug().Any("conversations", conversations).Msg("got conversations") + notifyErr := c.Session.NotifyDittoActivity() + if notifyErr != nil { + log.Fatal(notifyErr) + } + readyEvt := events.NewClientReady(newSessionId, conversations) + c.triggerEvent(readyEvt) + } + + case binary.AlertType_MOBILE_BATTERY_LOW: + c.Logger.Info().Msg("[MOBILE_BATTERY_LOW] Mobile device is on low battery") + evt := events.NewMobileBatteryLow() + c.triggerEvent(evt) + + case binary.AlertType_MOBILE_BATTERY_RESTORED: + c.Logger.Info().Msg("[MOBILE_BATTERY_RESTORED] Mobile device has restored enough battery!") + evt := events.NewMobileBatteryRestored() + c.triggerEvent(evt) + + case binary.AlertType_MOBILE_DATA_CONNECTION: + c.Logger.Info().Msg("[MOBILE_DATA_CONNECTION] Mobile device is now using data connection") + evt := events.NewMobileDataConnection() + c.triggerEvent(evt) + + case binary.AlertType_MOBILE_WIFI_CONNECTION: + c.Logger.Info().Msg("[MOBILE_WIFI_CONNECTION] Mobile device is now using wifi connection") + evt := events.NewMobileWifiConnection() + c.triggerEvent(evt) + + default: + c.Logger.Info().Any("data", data).Any("res", res).Msg("Got unknown alert type") + } +} diff --git a/libgm/util/constants.go b/libgm/util/constants.go index b547fe2..77a9d9c 100644 --- a/libgm/util/constants.go +++ b/libgm/util/constants.go @@ -1,7 +1,22 @@ package util +import ( + "go.mau.fi/mautrix-gmessages/libgm/binary" +) + +var BrowserType = binary.BrowserTypes_CHROME + const GoogleAPIKey = "AIzaSyCA4RsOZUFrm9whhtGosPlJLmVPnfSHKz8" const UserAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36" const OS = "Linux" const XUserAgent = "grpc-web-javascript/0.1" const QRCodeURLBase = "https://support.google.com/messages/?p=web_computer#?c=" + +// Deprecated +var ( + BROWSER_TYPE = BrowserType + GOOG_API_KEY = GoogleAPIKey + USER_AGENT = UserAgent + X_USER_AGENT = XUserAgent + QR_CODE_URL = QRCodeURLBase +) diff --git a/libgm/util/errors.go b/libgm/util/errors.go deleted file mode 100644 index 025eec4..0000000 --- a/libgm/util/errors.go +++ /dev/null @@ -1,11 +0,0 @@ -package util - -import "fmt" - -type InstructionNotFound struct { - Opcode int64 -} - -func (e *InstructionNotFound) Error() string { - return fmt.Sprintf("Could not find instruction for opcode %d", e.Opcode) -} diff --git a/libgm/util/func.go b/libgm/util/func.go index 7fc746a..667a5b2 100644 --- a/libgm/util/func.go +++ b/libgm/util/func.go @@ -3,16 +3,24 @@ package util import ( crand "crypto/rand" "encoding/hex" + "encoding/json" "fmt" "math/rand" "net/http" + "strconv" "time" "github.com/google/uuid" + + "go.mau.fi/mautrix-gmessages/libgm/binary" ) var Charset = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890") +func TimestampNow() time.Time { + return time.Now().UTC() +} + func RandStr(length int) string { b := make([]rune, length) for i := range b { @@ -132,3 +140,48 @@ func NewMediaUploadHeaders(imageSize string, command string, uploadOffset string headers.Add("accept-language", "en-US,en;q=0.9") return headers } + +func ParseConfigVersion(res []byte) (*binary.ConfigVersion, error) { + var data []interface{} + + marshalErr := json.Unmarshal(res, &data) + if marshalErr != nil { + return nil, marshalErr + } + + version := data[0].(string) + v1 := version[0:4] + v2 := version[4:6] + v3 := version[6:8] + + if v2[0] == 48 { + v2 = string(v2[1]) + } + if v3[0] == 48 { + v3 = string(v3[1]) + } + + first, e := strconv.Atoi(v1) + if e != nil { + return nil, e + } + + second, e1 := strconv.Atoi(v2) + if e1 != nil { + return nil, e1 + } + + third, e2 := strconv.Atoi(v3) + if e2 != nil { + return nil, e2 + } + + configMessage := &binary.ConfigVersion{ + V1: int32(first), + V2: int32(second), + V3: int32(third), + V4: 4, + V5: 6, + } + return configMessage, nil +} diff --git a/libgm/util/paths.go b/libgm/util/paths.go index c2e20d4..83d13bf 100644 --- a/libgm/util/paths.go +++ b/libgm/util/paths.go @@ -18,3 +18,8 @@ var MESSAGING = INSTANT_MESSAGING + "/$rpc/google.internal.communications.instan var RECEIVE_MESSAGES = MESSAGING + "/ReceiveMessages" var SEND_MESSAGE = MESSAGING + "/SendMessage" var ACK_MESSAGES = MESSAGING + "/AckMessages" + +var REGISTRATION = INSTANT_MESSAGING + "/$rpc/google.internal.communications.instantmessaging.v1.Registration" +var REGISTER_REFRESH = REGISTRATION + "/RegisterRefresh" + +var CONFIG_URL = "https://messages.google.com/web/config" diff --git a/portal.go b/portal.go index 105d3ad..57921bf 100644 --- a/portal.go +++ b/portal.go @@ -303,9 +303,9 @@ func (portal *Portal) handleMessageLoop() { func (portal *Portal) isOutgoingMessage(evt *binary.Message) id.EventID { portal.outgoingMessagesLock.Lock() defer portal.outgoingMessagesLock.Unlock() - evtID, ok := portal.outgoingMessages[evt.TmpId] + evtID, ok := portal.outgoingMessages[evt.TmpID] if ok { - delete(portal.outgoingMessages, evt.TmpId) + delete(portal.outgoingMessages, evt.TmpID) portal.markHandled(evt, map[string]id.EventID{"": evtID}, true) return evtID } @@ -338,7 +338,8 @@ func (portal *Portal) handleMessage(source *User, evt *binary.Message) { } var intent *appservice.IntentAPI - if evt.GetFrom().GetFromMe() { + // TODO is there a fromMe flag? + if evt.GetParticipantID() == portal.SelfUserID { intent = source.DoublePuppetIntent if intent == nil { log.Debug().Msg("Dropping message from self as double puppeting is not enabled") @@ -364,17 +365,17 @@ func (portal *Portal) handleMessage(source *User, evt *binary.Message) { MsgType: event.MsgText, Body: data.MessageContent.GetContent(), } - case *binary.MessageInfo_ImageContent: + case *binary.MessageInfo_MediaContent: content = event.MessageEventContent{ MsgType: event.MsgNotice, - Body: fmt.Sprintf("Attachment %s", data.ImageContent.GetImageName()), + Body: fmt.Sprintf("Attachment %s", data.MediaContent.GetMediaName()), } } resp, err := portal.sendMessage(intent, event.EventMessage, &content, nil, ts) if err != nil { log.Err(err).Msg("Failed to send message") } else { - eventIDs[part.OrderInternal] = resp.EventID + eventIDs[part.GetActionMessageID()] = resp.EventID lastEventID = resp.EventID } } @@ -423,7 +424,7 @@ func (portal *Portal) SyncParticipants(source *User, metadata *binary.Conversati for _, participant := range metadata.Participants { if participant.IsMe { continue - } else if participant.Id.Number == "" { + } else if participant.ID.Number == "" { portal.zlog.Warn().Interface("participant", participant).Msg("No number found in non-self participant entry") continue } @@ -433,7 +434,7 @@ func (portal *Portal) SyncParticipants(source *User, metadata *binary.Conversati manyParticipants = true } portal.zlog.Debug().Interface("participant", participant).Msg("Syncing participant") - puppet := source.GetPuppetByID(participant.Id.ParticipantID, participant.Id.Number) + puppet := source.GetPuppetByID(participant.ID.ParticipantID, participant.ID.Number) userIDs = append(userIDs, puppet.MXID) puppet.Sync(source, participant) if portal.MXID != "" { @@ -445,12 +446,12 @@ func (portal *Portal) SyncParticipants(source *User, metadata *binary.Conversati } } } - if !metadata.IsGroupChat && !manyParticipants && portal.OtherUserID != firstParticipant.Id.ParticipantID { + if !metadata.IsGroupChat && !manyParticipants && portal.OtherUserID != firstParticipant.ID.ParticipantID { portal.zlog.Info(). Str("old_other_user_id", portal.OtherUserID). - Str("new_other_user_id", firstParticipant.Id.ParticipantID). + Str("new_other_user_id", firstParticipant.ID.ParticipantID). Msg("Found other user ID in DM") - portal.OtherUserID = firstParticipant.Id.ParticipantID + portal.OtherUserID = firstParticipant.ID.ParticipantID changed = true } return userIDs, changed @@ -906,7 +907,7 @@ func (portal *Portal) HandleMatrixMessage(sender *User, evt *event.Event, timing SetConversationID(portal.ID). SetSelfParticipantID(portal.SelfUserID). SetContent(text). - SetTmpID(txnID), "", + SetTmpID(txnID), ) if err != nil { go ms.sendMessageMetrics(evt, err, "Error sending", true) diff --git a/puppet.go b/puppet.go index 3307adc..f2f4919 100644 --- a/puppet.go +++ b/puppet.go @@ -263,8 +263,8 @@ func (puppet *Puppet) Sync(source *User, contact *binary.Participant) { update := false if contact != nil { - if contact.Id.Number != "" && puppet.Phone != contact.Id.Number { - puppet.Phone = contact.Id.Number + if contact.ID.Number != "" && puppet.Phone != contact.ID.Number { + puppet.Phone = contact.ID.Number update = true } update = puppet.UpdateName(contact.GetFormattedNumber(), contact.GetFullName(), contact.GetFirstName()) || update diff --git a/user.go b/user.go index 1615500..ba0ce47 100644 --- a/user.go +++ b/user.go @@ -386,25 +386,12 @@ func (user *User) SetManagementRoom(roomID id.RoomID) { var ErrAlreadyLoggedIn = errors.New("already logged in") func (user *User) createClient() { - var devicePair *libgm.DevicePair - var cryptor *crypto.Cryptor - if user.Session != nil && user.Session.WebAuthKey != nil { - devicePair = &libgm.DevicePair{ - Mobile: user.Session.PhoneInfo, - Browser: user.Session.BrowserInfo, - } - cryptor = &crypto.Cryptor{ - AESCTR256Key: user.Session.AESKey, - SHA256Key: user.Session.HMACKey, - } - } else { - cryptor = crypto.NewCryptor(nil, nil) - user.Session = &database.Session{ - AESKey: cryptor.AESCTR256Key, - HMACKey: cryptor.SHA256Key, + if user.Session == nil { + user.Session = &libgm.AuthData{ + Cryptor: crypto.NewCryptor(nil, nil), } } - user.Client = libgm.NewClient(devicePair, cryptor, user.zlog.With().Str("component", "libgm").Logger(), nil) + user.Client = libgm.NewClient(user.Session, user.zlog.With().Str("component", "libgm").Logger()) user.Client.SetEventHandler(user.HandleEvent) } @@ -417,15 +404,7 @@ func (user *User) Login(ctx context.Context) (<-chan string, error) { user.unlockedDeleteConnection() } user.createClient() - pairer, err := user.Client.NewPairer(nil, 20) - if err != nil { - return nil, fmt.Errorf("failed to initialize pairer: %w", err) - } - resp, err := pairer.RegisterPhoneRelay() - if err != nil { - return nil, fmt.Errorf("failed to register phone relay: %w", err) - } - err = user.Client.Connect(resp.Field5.RpcKey) + err := user.Client.Connect() if err != nil { return nil, fmt.Errorf("failed to connect to Google Messages: %w", err) } @@ -446,7 +425,7 @@ func (user *User) Connect() bool { user.zlog.Debug().Msg("Connecting to Google Messages") user.BridgeState.Send(status.BridgeState{StateEvent: status.StateConnecting, Error: GMConnecting}) user.createClient() - err := user.Client.Connect(user.Session.WebAuthKey) + err := user.Client.Connect() if err != nil { user.zlog.Err(err).Msg("Error connecting to Google Messages") user.BridgeState.Send(status.BridgeState{ @@ -550,36 +529,34 @@ func (user *User) HandleEvent(event interface{}) { user.hackyLoginCommand = nil user.hackyLoginCommandPrevEvent = "" user.tryAutomaticDoublePuppeting() - user.Phone = v.PairDeviceData.Mobile.RegistrationID - user.Session.PhoneInfo = v.PairDeviceData.Mobile - user.Session.BrowserInfo = v.PairDeviceData.Browser - user.Session.WebAuthKey = v.PairDeviceData.WebAuthKeyData.GetWebAuthKey() + user.Phone = v.GetMobile().GetSourceID() user.addToPhoneMap() err := user.Update(context.TODO()) if err != nil { user.zlog.Err(err).Msg("Failed to update session in database") } - case *binary.Event_ConversationEvent: - portal := user.GetPortalByID(v.ConversationEvent.GetData().GetConversationID()) + case *events.AuthTokenRefreshed: + err := user.Update(context.TODO()) + if err != nil { + user.zlog.Err(err).Msg("Failed to update session in database") + } + case *binary.Conversation: + portal := user.GetPortalByID(v.GetConversationID()) if portal.MXID != "" { - portal.UpdateMetadata(user, v.ConversationEvent.GetData()) + portal.UpdateMetadata(user, v) } else { - err := portal.CreateMatrixRoom(user, v.ConversationEvent.GetData()) + err := portal.CreateMatrixRoom(user, v) if err != nil { user.zlog.Err(err).Msg("Error creating Matrix room from conversation event") } } - case *binary.Event_MessageEvent: - portal := user.GetPortalByID(v.MessageEvent.GetData().GetConversationID()) - portal.messages <- PortalMessage{evt: v.MessageEvent.GetData(), source: user} + case *binary.Message: + portal := user.GetPortalByID(v.GetConversationID()) + portal.messages <- PortalMessage{evt: v, source: user} case *events.ClientReady: user.zlog.Trace().Any("data", v).Msg("Client is ready!") case *events.BrowserActive: user.zlog.Trace().Any("data", v).Msg("Browser active") - case *events.Battery: - user.zlog.Trace().Any("data", v).Msg("Battery") - case *events.DataConnection: - user.zlog.Trace().Any("data", v).Msg("Data connection") default: user.zlog.Trace().Any("data", v).Msg("Unknown event") }