Unhardcode receive messages request payload format
This commit is contained in:
parent
0bc6a41b32
commit
1866cf86ec
16 changed files with 295 additions and 203 deletions
|
@ -277,8 +277,8 @@ type UploadImagePayload struct {
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
MetaData *ImageMetaData `protobuf:"bytes,1,opt,name=metaData,proto3" json:"metaData,omitempty"`
|
MetaData *ImageMetaData `protobuf:"bytes,1,opt,name=metaData,proto3" json:"metaData,omitempty"`
|
||||||
AuthData *AuthMessageBytes `protobuf:"bytes,2,opt,name=authData,proto3" json:"authData,omitempty"`
|
AuthData *AuthMessage `protobuf:"bytes,2,opt,name=authData,proto3" json:"authData,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UploadImagePayload) Reset() {
|
func (x *UploadImagePayload) Reset() {
|
||||||
|
@ -320,7 +320,7 @@ func (x *UploadImagePayload) GetMetaData() *ImageMetaData {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UploadImagePayload) GetAuthData() *AuthMessageBytes {
|
func (x *UploadImagePayload) GetAuthData() *AuthMessage {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.AuthData
|
return x.AuthData
|
||||||
}
|
}
|
||||||
|
@ -461,22 +461,22 @@ var file_client_proto_rawDesc = []byte{
|
||||||
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49,
|
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49,
|
||||||
0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, 0x02,
|
0x64, 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,
|
0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x22,
|
||||||
0x7f, 0x0a, 0x12, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x61,
|
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,
|
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,
|
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,
|
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, 0x36, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68,
|
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, 0x1a, 0x2e, 0x6d, 0x65, 0x73,
|
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,
|
0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||||
0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61,
|
0x65, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x22, 0x3c, 0x0a, 0x13, 0x42,
|
||||||
0x22, 0x3c, 0x0a, 0x13, 0x42, 0x75, 0x67, 0x6c, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64,
|
0x75, 0x67, 0x6c, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
|
0x63, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x42,
|
0x32, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x42, 0x75, 0x67, 0x6c, 0x65, 0x43,
|
||||||
0x75, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1f,
|
0x6f, 0x64, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1f, 0x0a, 0x09, 0x42, 0x75, 0x67,
|
||||||
0x0a, 0x09, 0x42, 0x75, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74,
|
0x6c, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02,
|
||||||
0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42,
|
0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e,
|
||||||
0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62,
|
0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -504,7 +504,6 @@ var file_client_proto_goTypes = []interface{}{
|
||||||
(*MessageData)(nil), // 8: messages.MessageData
|
(*MessageData)(nil), // 8: messages.MessageData
|
||||||
(*AuthMessage)(nil), // 9: messages.AuthMessage
|
(*AuthMessage)(nil), // 9: messages.AuthMessage
|
||||||
(*EmptyArr)(nil), // 10: messages.EmptyArr
|
(*EmptyArr)(nil), // 10: messages.EmptyArr
|
||||||
(*AuthMessageBytes)(nil), // 11: messages.AuthMessageBytes
|
|
||||||
}
|
}
|
||||||
var file_client_proto_depIdxs = []int32{
|
var file_client_proto_depIdxs = []int32{
|
||||||
7, // 0: client.SendMessage.pairedDevice:type_name -> messages.Device
|
7, // 0: client.SendMessage.pairedDevice:type_name -> messages.Device
|
||||||
|
@ -515,7 +514,7 @@ var file_client_proto_depIdxs = []int32{
|
||||||
10, // 5: client.AckMessagePayload.emptyArr:type_name -> messages.EmptyArr
|
10, // 5: client.AckMessagePayload.emptyArr:type_name -> messages.EmptyArr
|
||||||
7, // 6: client.AckMessageData.device:type_name -> messages.Device
|
7, // 6: client.AckMessageData.device:type_name -> messages.Device
|
||||||
3, // 7: client.UploadImagePayload.metaData:type_name -> client.ImageMetaData
|
3, // 7: client.UploadImagePayload.metaData:type_name -> client.ImageMetaData
|
||||||
11, // 8: client.UploadImagePayload.authData:type_name -> messages.AuthMessageBytes
|
9, // 8: client.UploadImagePayload.authData:type_name -> messages.AuthMessage
|
||||||
6, // 9: client.BugleBackendService.data:type_name -> client.BugleCode
|
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 output_type
|
||||||
10, // [10:10] is the sub-list for method input_type
|
10, // [10:10] is the sub-list for method input_type
|
||||||
|
|
|
@ -1142,11 +1142,13 @@ type MessageStatus struct {
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// // MMS / SMS
|
||||||
// UNKNOWN_STATUS = 0;
|
// UNKNOWN_STATUS = 0;
|
||||||
//
|
|
||||||
// SENDING = 5;
|
// SENDING = 5;
|
||||||
//
|
|
||||||
// SENT = 1;
|
// SENT = 1;
|
||||||
|
//
|
||||||
|
// // RCS
|
||||||
|
// READ|SEEN = 11;
|
||||||
Code int64 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
|
Code int64 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
|
||||||
ErrMsg string `protobuf:"bytes,4,opt,name=errMsg,proto3" json:"errMsg,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"`
|
MsgStatus string `protobuf:"bytes,5,opt,name=msgStatus,proto3" json:"msgStatus,omitempty"`
|
||||||
|
|
|
@ -273,9 +273,7 @@ var File_events_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_events_proto_rawDesc = []byte{
|
var file_events_proto_rawDesc = []byte{
|
||||||
0x0a, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
|
0x0a, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
|
||||||
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x0e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
|
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61,
|
||||||
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, 0xd9, 0x01, 0x0a, 0x05,
|
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,
|
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,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||||
|
@ -345,8 +343,6 @@ func file_events_proto_init() {
|
||||||
if File_events_proto != nil {
|
if File_events_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_settings_proto_init()
|
|
||||||
file_messages_proto_init()
|
|
||||||
file_conversations_proto_init()
|
file_conversations_proto_init()
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
|
|
@ -25,9 +25,9 @@ type StartMediaUploadPayload struct {
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
ImageType int64 `protobuf:"varint,1,opt,name=imageType,proto3" json:"imageType,omitempty"`
|
ImageType int64 `protobuf:"varint,1,opt,name=imageType,proto3" json:"imageType,omitempty"`
|
||||||
AuthData *AuthMessageBytes `protobuf:"bytes,2,opt,name=authData,proto3" json:"authData,omitempty"`
|
AuthData *AuthMessage `protobuf:"bytes,2,opt,name=authData,proto3" json:"authData,omitempty"`
|
||||||
Mobile *Device `protobuf:"bytes,3,opt,name=mobile,proto3" json:"mobile,omitempty"`
|
Mobile *Device `protobuf:"bytes,3,opt,name=mobile,proto3" json:"mobile,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *StartMediaUploadPayload) Reset() {
|
func (x *StartMediaUploadPayload) Reset() {
|
||||||
|
@ -69,7 +69,7 @@ func (x *StartMediaUploadPayload) GetImageType() int64 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *StartMediaUploadPayload) GetAuthData() *AuthMessageBytes {
|
func (x *StartMediaUploadPayload) GetAuthData() *AuthMessage {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.AuthData
|
return x.AuthData
|
||||||
}
|
}
|
||||||
|
@ -198,28 +198,27 @@ var File_media_proto protoreflect.FileDescriptor
|
||||||
var file_media_proto_rawDesc = []byte{
|
var file_media_proto_rawDesc = []byte{
|
||||||
0x0a, 0x0b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d,
|
0x0a, 0x0b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d,
|
||||||
0x65, 0x64, 0x69, 0x61, 0x1a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70,
|
0x65, 0x64, 0x69, 0x61, 0x1a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x01, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x4d, 0x65,
|
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x4d, 0x65,
|
||||||
0x64, 0x69, 0x61, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
|
0x64, 0x69, 0x61, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
|
||||||
0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
|
0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
|
||||||
0x01, 0x28, 0x03, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x36,
|
0x01, 0x28, 0x03, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31,
|
||||||
0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68,
|
0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68,
|
||||||
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x08, 0x61, 0x75,
|
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74,
|
||||||
0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65,
|
0x61, 0x12, 0x28, 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76,
|
||||||
0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65,
|
0x69, 0x63, 0x65, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x22, 0x53, 0x0a, 0x13, 0x55,
|
||||||
0x22, 0x53, 0x0a, 0x13, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x52,
|
0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x6d, 0x65, 0x64, 0x69, 0x61,
|
0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x4d,
|
0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x52,
|
||||||
0x65, 0x64, 0x69, 0x61, 0x52, 0x05, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x6d,
|
0x05, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
|
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x43, 0x0a, 0x05, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x12, 0x18,
|
0x22, 0x43, 0x0a, 0x05, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x64,
|
||||||
0x0a, 0x07, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x69, 0x61, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x64, 0x69,
|
||||||
0x07, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x64, 0x69,
|
0x61, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x4e, 0x75, 0x6d, 0x62,
|
||||||
0x61, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d,
|
0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x4e,
|
||||||
0x65, 0x64, 0x69, 0x61, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e,
|
0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62,
|
||||||
0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -239,11 +238,11 @@ var file_media_proto_goTypes = []interface{}{
|
||||||
(*StartMediaUploadPayload)(nil), // 0: media.StartMediaUploadPayload
|
(*StartMediaUploadPayload)(nil), // 0: media.StartMediaUploadPayload
|
||||||
(*UploadMediaResponse)(nil), // 1: media.UploadMediaResponse
|
(*UploadMediaResponse)(nil), // 1: media.UploadMediaResponse
|
||||||
(*Media)(nil), // 2: media.Media
|
(*Media)(nil), // 2: media.Media
|
||||||
(*AuthMessageBytes)(nil), // 3: messages.AuthMessageBytes
|
(*AuthMessage)(nil), // 3: messages.AuthMessage
|
||||||
(*Device)(nil), // 4: messages.Device
|
(*Device)(nil), // 4: messages.Device
|
||||||
}
|
}
|
||||||
var file_media_proto_depIdxs = []int32{
|
var file_media_proto_depIdxs = []int32{
|
||||||
3, // 0: media.StartMediaUploadPayload.authData:type_name -> messages.AuthMessageBytes
|
3, // 0: media.StartMediaUploadPayload.authData:type_name -> messages.AuthMessage
|
||||||
4, // 1: media.StartMediaUploadPayload.mobile:type_name -> messages.Device
|
4, // 1: media.StartMediaUploadPayload.mobile:type_name -> messages.Device
|
||||||
2, // 2: media.UploadMediaResponse.media:type_name -> media.Media
|
2, // 2: media.UploadMediaResponse.media:type_name -> media.Media
|
||||||
3, // [3:3] is the sub-list for method output_type
|
3, // [3:3] is the sub-list for method output_type
|
||||||
|
|
|
@ -414,7 +414,7 @@ type AuthMessage struct {
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
|
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
|
||||||
RpcKey string `protobuf:"bytes,6,opt,name=rpcKey,proto3" json:"rpcKey,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"`
|
Date *Date `protobuf:"bytes,7,opt,name=date,proto3" json:"date,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,11 +457,11 @@ func (x *AuthMessage) GetRequestId() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AuthMessage) GetRpcKey() string {
|
func (x *AuthMessage) GetRpcKey() []byte {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.RpcKey
|
return x.RpcKey
|
||||||
}
|
}
|
||||||
return ""
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AuthMessage) GetDate() *Date {
|
func (x *AuthMessage) GetDate() *Date {
|
||||||
|
@ -471,18 +471,17 @@ func (x *AuthMessage) GetDate() *Date {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type AuthMessageBytes struct {
|
type ReceiveMessagesRequest struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
|
Auth *AuthMessage `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"`
|
||||||
RpcKey []byte `protobuf:"bytes,6,opt,name=rpcKey,proto3" json:"rpcKey,omitempty"`
|
Unknown *ReceiveMessagesRequest_UnknownEmptyObject2 `protobuf:"bytes,4,opt,name=unknown,proto3,oneof" json:"unknown,omitempty"`
|
||||||
Date *Date `protobuf:"bytes,7,opt,name=date,proto3" json:"date,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AuthMessageBytes) Reset() {
|
func (x *ReceiveMessagesRequest) Reset() {
|
||||||
*x = AuthMessageBytes{}
|
*x = ReceiveMessagesRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_messages_proto_msgTypes[6]
|
mi := &file_messages_proto_msgTypes[6]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
@ -490,13 +489,13 @@ func (x *AuthMessageBytes) Reset() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AuthMessageBytes) String() string {
|
func (x *ReceiveMessagesRequest) String() string {
|
||||||
return protoimpl.X.MessageStringOf(x)
|
return protoimpl.X.MessageStringOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*AuthMessageBytes) ProtoMessage() {}
|
func (*ReceiveMessagesRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *AuthMessageBytes) ProtoReflect() protoreflect.Message {
|
func (x *ReceiveMessagesRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[6]
|
mi := &file_messages_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
@ -508,28 +507,21 @@ func (x *AuthMessageBytes) ProtoReflect() protoreflect.Message {
|
||||||
return mi.MessageOf(x)
|
return mi.MessageOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use AuthMessageBytes.ProtoReflect.Descriptor instead.
|
// Deprecated: Use ReceiveMessagesRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*AuthMessageBytes) Descriptor() ([]byte, []int) {
|
func (*ReceiveMessagesRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{6}
|
return file_messages_proto_rawDescGZIP(), []int{6}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AuthMessageBytes) GetRequestId() string {
|
func (x *ReceiveMessagesRequest) GetAuth() *AuthMessage {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.RequestId
|
return x.Auth
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *AuthMessageBytes) GetRpcKey() []byte {
|
|
||||||
if x != nil {
|
|
||||||
return x.RpcKey
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AuthMessageBytes) GetDate() *Date {
|
func (x *ReceiveMessagesRequest) GetUnknown() *ReceiveMessagesRequest_UnknownEmptyObject2 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Date
|
return x.Unknown
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -786,6 +778,91 @@ func (x *Date) GetSeq4() int64 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ReceiveMessagesRequest_UnknownEmptyObject1 struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ReceiveMessagesRequest_UnknownEmptyObject1) Reset() {
|
||||||
|
*x = ReceiveMessagesRequest_UnknownEmptyObject1{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_messages_proto_msgTypes[11]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ReceiveMessagesRequest_UnknownEmptyObject1) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ReceiveMessagesRequest_UnknownEmptyObject1) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ReceiveMessagesRequest_UnknownEmptyObject1) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_messages_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 ReceiveMessagesRequest_UnknownEmptyObject1.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ReceiveMessagesRequest_UnknownEmptyObject1) Descriptor() ([]byte, []int) {
|
||||||
|
return file_messages_proto_rawDescGZIP(), []int{6, 0}
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReceiveMessagesRequest_UnknownEmptyObject2 struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Unknown *ReceiveMessagesRequest_UnknownEmptyObject1 `protobuf:"bytes,2,opt,name=unknown,proto3" json:"unknown,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ReceiveMessagesRequest_UnknownEmptyObject2) Reset() {
|
||||||
|
*x = ReceiveMessagesRequest_UnknownEmptyObject2{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_messages_proto_msgTypes[12]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ReceiveMessagesRequest_UnknownEmptyObject2) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ReceiveMessagesRequest_UnknownEmptyObject2) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ReceiveMessagesRequest_UnknownEmptyObject2) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_messages_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 ReceiveMessagesRequest_UnknownEmptyObject2.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ReceiveMessagesRequest_UnknownEmptyObject2) Descriptor() ([]byte, []int) {
|
||||||
|
return file_messages_proto_rawDescGZIP(), []int{6, 1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ReceiveMessagesRequest_UnknownEmptyObject2) GetUnknown() *ReceiveMessagesRequest_UnknownEmptyObject1 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Unknown
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var File_messages_proto protoreflect.FileDescriptor
|
var File_messages_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_messages_proto_rawDesc = []byte{
|
var file_messages_proto_rawDesc = []byte{
|
||||||
|
@ -847,41 +924,53 @@ var file_messages_proto_rawDesc = []byte{
|
||||||
0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75,
|
0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75,
|
||||||
0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65,
|
0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x70, 0x63, 0x4b, 0x65,
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x70, 0x63, 0x4b, 0x65,
|
||||||
0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x70, 0x63, 0x4b, 0x65, 0x79, 0x12,
|
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,
|
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,
|
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x04, 0x64,
|
||||||
0x61, 0x74, 0x65, 0x22, 0x6d, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
0x61, 0x74, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d,
|
||||||
0x67, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65,
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29,
|
||||||
0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71,
|
0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d,
|
||||||
0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x70, 0x63, 0x4b, 0x65, 0x79,
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73,
|
||||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x70, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x22,
|
0x61, 0x67, 0x65, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x12, 0x53, 0x0a, 0x07, 0x75, 0x6e, 0x6b,
|
||||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6d,
|
0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6d, 0x65, 0x73,
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x04, 0x64, 0x61,
|
0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73,
|
||||||
0x74, 0x65, 0x22, 0x4c, 0x0a, 0x08, 0x42, 0x61, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10,
|
0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x6e, 0x6b,
|
||||||
0x0a, 0x03, 0x54, 0x74, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x54, 0x74, 0x6c,
|
0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32,
|
||||||
0x12, 0x2e, 0x0a, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x18, 0x06, 0x20, 0x01,
|
0x48, 0x00, 0x52, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x88, 0x01, 0x01, 0x1a, 0x15,
|
||||||
0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x45, 0x6d,
|
0x0a, 0x13, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4f, 0x62,
|
||||||
0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x52, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72,
|
0x6a, 0x65, 0x63, 0x74, 0x31, 0x1a, 0x65, 0x0a, 0x13, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e,
|
||||||
0x22, 0x52, 0x0a, 0x0b, 0x52, 0x50, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
0x45, 0x6d, 0x70, 0x74, 0x79, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x12, 0x4e, 0x0a, 0x07,
|
||||||
0x18, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
|
0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e,
|
||||||
0x52, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74,
|
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
|
||||||
0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
|
||||||
0x65, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04,
|
0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4f, 0x62, 0x6a, 0x65,
|
||||||
0x64, 0x61, 0x74, 0x61, 0x22, 0x62, 0x0a, 0x06, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16,
|
0x63, 0x74, 0x31, 0x52, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x42, 0x0a, 0x0a, 0x08,
|
||||||
0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
|
0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x22, 0x4c, 0x0a, 0x08, 0x42, 0x61, 0x73, 0x65,
|
||||||
0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
|
0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x74, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e,
|
0x03, 0x52, 0x03, 0x54, 0x74, 0x6c, 0x12, 0x2e, 0x0a, 0x08, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x41,
|
||||||
0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x18,
|
0x72, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
|
||||||
0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x67, 0x65, 0x73, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x52, 0x08, 0x65, 0x6d,
|
||||||
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x6a, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65,
|
0x70, 0x74, 0x79, 0x41, 0x72, 0x72, 0x22, 0x52, 0x0a, 0x0b, 0x52, 0x50, 0x43, 0x52, 0x65, 0x73,
|
||||||
0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e,
|
||||||
0x79, 0x65, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x31, 0x18, 0x04, 0x20, 0x01,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x12,
|
||||||
0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x32,
|
0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
|
||||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x32, 0x12, 0x12, 0x0a, 0x04,
|
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||||
0x73, 0x65, 0x71, 0x33, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x33,
|
0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x62, 0x0a, 0x06, 0x44, 0x65,
|
||||||
0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x34, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
|
0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01,
|
||||||
0x73, 0x65, 0x71, 0x34, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69,
|
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e,
|
||||||
0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69,
|
||||||
|
0x6f, 0x6e, 0x49, 0x64, 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,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -896,19 +985,21 @@ func file_messages_proto_rawDescGZIP() []byte {
|
||||||
return file_messages_proto_rawDescData
|
return file_messages_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||||
var file_messages_proto_goTypes = []interface{}{
|
var file_messages_proto_goTypes = []interface{}{
|
||||||
(*EncodedPayload)(nil), // 0: messages.EncodedPayload
|
(*EncodedPayload)(nil), // 0: messages.EncodedPayload
|
||||||
(*EncodedResponse)(nil), // 1: messages.EncodedResponse
|
(*EncodedResponse)(nil), // 1: messages.EncodedResponse
|
||||||
(*MessageData)(nil), // 2: messages.MessageData
|
(*MessageData)(nil), // 2: messages.MessageData
|
||||||
(*MsgTypeArr)(nil), // 3: messages.MsgTypeArr
|
(*MsgTypeArr)(nil), // 3: messages.MsgTypeArr
|
||||||
(*EmptyArr)(nil), // 4: messages.EmptyArr
|
(*EmptyArr)(nil), // 4: messages.EmptyArr
|
||||||
(*AuthMessage)(nil), // 5: messages.AuthMessage
|
(*AuthMessage)(nil), // 5: messages.AuthMessage
|
||||||
(*AuthMessageBytes)(nil), // 6: messages.AuthMessageBytes
|
(*ReceiveMessagesRequest)(nil), // 6: messages.ReceiveMessagesRequest
|
||||||
(*BaseData)(nil), // 7: messages.BaseData
|
(*BaseData)(nil), // 7: messages.BaseData
|
||||||
(*RPCResponse)(nil), // 8: messages.RPCResponse
|
(*RPCResponse)(nil), // 8: messages.RPCResponse
|
||||||
(*Device)(nil), // 9: messages.Device
|
(*Device)(nil), // 9: messages.Device
|
||||||
(*Date)(nil), // 10: messages.Date
|
(*Date)(nil), // 10: messages.Date
|
||||||
|
(*ReceiveMessagesRequest_UnknownEmptyObject1)(nil), // 11: messages.ReceiveMessagesRequest.UnknownEmptyObject1
|
||||||
|
(*ReceiveMessagesRequest_UnknownEmptyObject2)(nil), // 12: messages.ReceiveMessagesRequest.UnknownEmptyObject2
|
||||||
}
|
}
|
||||||
var file_messages_proto_depIdxs = []int32{
|
var file_messages_proto_depIdxs = []int32{
|
||||||
9, // 0: messages.MessageData.mobile:type_name -> messages.Device
|
9, // 0: messages.MessageData.mobile:type_name -> messages.Device
|
||||||
|
@ -916,14 +1007,16 @@ var file_messages_proto_depIdxs = []int32{
|
||||||
3, // 2: messages.MessageData.msgTypeArr:type_name -> messages.MsgTypeArr
|
3, // 2: messages.MessageData.msgTypeArr:type_name -> messages.MsgTypeArr
|
||||||
4, // 3: messages.MsgTypeArr.emptyArr:type_name -> messages.EmptyArr
|
4, // 3: messages.MsgTypeArr.emptyArr:type_name -> messages.EmptyArr
|
||||||
10, // 4: messages.AuthMessage.date:type_name -> messages.Date
|
10, // 4: messages.AuthMessage.date:type_name -> messages.Date
|
||||||
10, // 5: messages.AuthMessageBytes.date:type_name -> messages.Date
|
5, // 5: messages.ReceiveMessagesRequest.auth:type_name -> messages.AuthMessage
|
||||||
4, // 6: messages.BaseData.emptyArr:type_name -> messages.EmptyArr
|
12, // 6: messages.ReceiveMessagesRequest.unknown:type_name -> messages.ReceiveMessagesRequest.UnknownEmptyObject2
|
||||||
2, // 7: messages.RPCResponse.data:type_name -> messages.MessageData
|
4, // 7: messages.BaseData.emptyArr:type_name -> messages.EmptyArr
|
||||||
8, // [8:8] is the sub-list for method output_type
|
2, // 8: messages.RPCResponse.data:type_name -> messages.MessageData
|
||||||
8, // [8:8] is the sub-list for method input_type
|
11, // 9: messages.ReceiveMessagesRequest.UnknownEmptyObject2.unknown:type_name -> messages.ReceiveMessagesRequest.UnknownEmptyObject1
|
||||||
8, // [8:8] is the sub-list for extension type_name
|
10, // [10:10] is the sub-list for method output_type
|
||||||
8, // [8:8] is the sub-list for extension extendee
|
10, // [10:10] is the sub-list for method input_type
|
||||||
0, // [0:8] is the sub-list for field type_name
|
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_messages_proto_init() }
|
func init() { file_messages_proto_init() }
|
||||||
|
@ -1005,7 +1098,7 @@ func file_messages_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_messages_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
file_messages_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*AuthMessageBytes); i {
|
switch v := v.(*ReceiveMessagesRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -1064,14 +1157,39 @@ func file_messages_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_messages_proto_msgTypes[11].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[12].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*ReceiveMessagesRequest_UnknownEmptyObject2); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
file_messages_proto_msgTypes[6].OneofWrappers = []interface{}{}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_messages_proto_rawDesc,
|
RawDescriptor: file_messages_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 11,
|
NumMessages: 13,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
|
|
@ -31,7 +31,7 @@ message ImageMetaData {
|
||||||
|
|
||||||
message UploadImagePayload {
|
message UploadImagePayload {
|
||||||
ImageMetaData metaData = 1;
|
ImageMetaData metaData = 1;
|
||||||
messages.AuthMessageBytes authData = 2;
|
messages.AuthMessage authData = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message BugleBackendService {
|
message BugleBackendService {
|
||||||
|
|
|
@ -3,8 +3,6 @@ package events;
|
||||||
|
|
||||||
option go_package = "../../binary";
|
option go_package = "../../binary";
|
||||||
|
|
||||||
import "settings.proto";
|
|
||||||
import "messages.proto";
|
|
||||||
import "conversations.proto";
|
import "conversations.proto";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -7,7 +7,7 @@ import "messages.proto";
|
||||||
|
|
||||||
message StartMediaUploadPayload {
|
message StartMediaUploadPayload {
|
||||||
int64 imageType = 1;
|
int64 imageType = 1;
|
||||||
messages.AuthMessageBytes authData = 2;
|
messages.AuthMessage authData = 2;
|
||||||
messages.Device mobile = 3;
|
messages.Device mobile = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,14 +47,18 @@ message EmptyArr {
|
||||||
|
|
||||||
message AuthMessage {
|
message AuthMessage {
|
||||||
string request_id = 1;
|
string request_id = 1;
|
||||||
string rpcKey = 6;
|
bytes rpcKey = 6;
|
||||||
Date date = 7;
|
Date date = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
message AuthMessageBytes {
|
message ReceiveMessagesRequest {
|
||||||
string request_id = 1;
|
AuthMessage auth = 1;
|
||||||
bytes rpcKey = 6;
|
|
||||||
Date date = 7;
|
message UnknownEmptyObject1 {}
|
||||||
|
message UnknownEmptyObject2 {
|
||||||
|
UnknownEmptyObject1 unknown = 2;
|
||||||
|
}
|
||||||
|
optional UnknownEmptyObject2 unknown = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message BaseData {
|
message BaseData {
|
||||||
|
|
|
@ -34,7 +34,7 @@ type Client struct {
|
||||||
sessionHandler *SessionHandler
|
sessionHandler *SessionHandler
|
||||||
instructions *Instructions
|
instructions *Instructions
|
||||||
|
|
||||||
rpcKey string
|
rpcKey []byte
|
||||||
ttl int64
|
ttl int64
|
||||||
|
|
||||||
proxy Proxy
|
proxy Proxy
|
||||||
|
@ -87,7 +87,7 @@ func (c *Client) SetProxy(proxy string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) Connect(rpcKey string) error {
|
func (c *Client) Connect(rpcKey []byte) error {
|
||||||
rpcPayload, receiveMesageSessionId, err := payload.ReceiveMessages(rpcKey)
|
rpcPayload, receiveMesageSessionId, err := payload.ReceiveMessages(rpcKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
@ -100,7 +100,7 @@ func (c *Client) Connect(rpcKey string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) Reconnect(rpcKey string) error {
|
func (c *Client) Reconnect(rpcKey []byte) error {
|
||||||
c.rpc.CloseConnection()
|
c.rpc.CloseConnection()
|
||||||
for c.rpc.conn != nil {
|
for c.rpc.conn != nil {
|
||||||
time.Sleep(time.Millisecond * 100)
|
time.Sleep(time.Millisecond * 100)
|
||||||
|
@ -166,19 +166,15 @@ func (c *Client) decryptImages(messages *binary.FetchMessagesResponse) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) decryptImageData(imageId string, key []byte) ([]byte, error) {
|
func (c *Client) decryptImageData(imageId string, key []byte) ([]byte, error) {
|
||||||
decodedRpcKey, err := base64.StdEncoding.DecodeString(c.rpcKey)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
reqId := util.RandomUUIDv4()
|
reqId := util.RandomUUIDv4()
|
||||||
download_metadata := &binary.UploadImagePayload{
|
download_metadata := &binary.UploadImagePayload{
|
||||||
MetaData: &binary.ImageMetaData{
|
MetaData: &binary.ImageMetaData{
|
||||||
ImageId: imageId,
|
ImageId: imageId,
|
||||||
Encrypted: true,
|
Encrypted: true,
|
||||||
},
|
},
|
||||||
AuthData: &binary.AuthMessageBytes{
|
AuthData: &binary.AuthMessage{
|
||||||
RequestId: reqId,
|
RequestId: reqId,
|
||||||
RpcKey: decodedRpcKey,
|
RpcKey: c.rpcKey,
|
||||||
Date: &binary.Date{
|
Date: &binary.Date{
|
||||||
Year: 2023,
|
Year: 2023,
|
||||||
Seq1: 6,
|
Seq1: 6,
|
||||||
|
|
|
@ -2,7 +2,6 @@ package libgm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/base64"
|
|
||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
@ -133,18 +132,12 @@ func (c *Client) StartUploadMedia(image *Image) (*StartGoogleUpload, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) buildStartUploadPayload() (string, error) {
|
func (c *Client) buildStartUploadPayload() (string, error) {
|
||||||
|
|
||||||
decodedRpcKey, err := base64.StdEncoding.DecodeString(c.rpcKey)
|
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
|
|
||||||
requestId := util.RandomUUIDv4()
|
requestId := util.RandomUUIDv4()
|
||||||
protoData := &binary.StartMediaUploadPayload{
|
protoData := &binary.StartMediaUploadPayload{
|
||||||
ImageType: 1,
|
ImageType: 1,
|
||||||
AuthData: &binary.AuthMessageBytes{
|
AuthData: &binary.AuthMessage{
|
||||||
RequestId: requestId,
|
RequestId: requestId,
|
||||||
RpcKey: decodedRpcKey,
|
RpcKey: c.rpcKey,
|
||||||
Date: &binary.Date{
|
Date: &binary.Date{
|
||||||
Year: 2023,
|
Year: 2023,
|
||||||
Seq1: 6,
|
Seq1: 6,
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package libgm
|
package libgm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
|
||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -140,9 +139,9 @@ func (p *Pairer) GetWebEncryptionKey() {
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
p.client.Logger.Err(err2).Msg("Parse webkeyresponse into proto struct error")
|
p.client.Logger.Err(err2).Msg("Parse webkeyresponse into proto struct error")
|
||||||
}
|
}
|
||||||
key := base64.StdEncoding.EncodeToString(p.client.rpc.webAuthKey)
|
p.client.Logger.Debug().Any("parsedResponse", parsedResponse).Msg("WebEncryptionKeyResponse")
|
||||||
p.ticker.Stop()
|
p.ticker.Stop()
|
||||||
reconnectErr := p.client.Reconnect(key)
|
reconnectErr := p.client.Reconnect(p.client.rpc.webAuthKey)
|
||||||
if reconnectErr != nil {
|
if reconnectErr != nil {
|
||||||
panic(reconnectErr)
|
panic(reconnectErr)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,42 +3,36 @@ package payload
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"go.mau.fi/mautrix-gmessages/libgm/util"
|
"github.com/google/uuid"
|
||||||
|
|
||||||
|
"go.mau.fi/mautrix-gmessages/libgm/binary"
|
||||||
|
"go.mau.fi/mautrix-gmessages/libgm/pblite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ReceiveMessages(rpcKey string) ([]byte, string, error) {
|
func ReceiveMessages(rpcKey []byte) ([]byte, string, error) {
|
||||||
id := util.RandomUUIDv4()
|
payload := &binary.ReceiveMessagesRequest{
|
||||||
data := []interface{}{
|
Auth: &binary.AuthMessage{
|
||||||
[]interface{}{
|
RequestId: uuid.New().String(),
|
||||||
id,
|
RpcKey: rpcKey,
|
||||||
nil,
|
Date: &binary.Date{
|
||||||
nil,
|
Year: 2023,
|
||||||
nil,
|
Seq1: 6,
|
||||||
nil,
|
Seq2: 8,
|
||||||
rpcKey,
|
Seq3: 4,
|
||||||
[]interface{}{
|
Seq4: 6,
|
||||||
nil,
|
|
||||||
nil,
|
|
||||||
2023,
|
|
||||||
6,
|
|
||||||
8,
|
|
||||||
nil,
|
|
||||||
4,
|
|
||||||
nil,
|
|
||||||
6,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
nil,
|
Unknown: &binary.ReceiveMessagesRequest_UnknownEmptyObject2{
|
||||||
nil,
|
Unknown: &binary.ReceiveMessagesRequest_UnknownEmptyObject1{},
|
||||||
[]interface{}{
|
|
||||||
nil,
|
|
||||||
[]interface{}{},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
data, err := pblite.Serialize(payload.ProtoReflect())
|
||||||
|
if err != nil {
|
||||||
|
return nil, "", err
|
||||||
|
}
|
||||||
jsonData, err := json.Marshal(data)
|
jsonData, err := json.Marshal(data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, "", err
|
return nil, "", err
|
||||||
}
|
}
|
||||||
return jsonData, id, nil
|
return jsonData, payload.Auth.RequestId, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,16 @@
|
||||||
package payload
|
package payload
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
|
||||||
|
|
||||||
"go.mau.fi/mautrix-gmessages/libgm/binary"
|
"go.mau.fi/mautrix-gmessages/libgm/binary"
|
||||||
"go.mau.fi/mautrix-gmessages/libgm/util"
|
"go.mau.fi/mautrix-gmessages/libgm/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
func RefreshPhoneRelay(rpcKey string) ([]byte, *binary.Container, error) {
|
func RefreshPhoneRelay(rpcKey []byte) ([]byte, *binary.Container, error) {
|
||||||
decodedRpcKey, err1 := base64.StdEncoding.DecodeString(rpcKey)
|
|
||||||
if err1 != nil {
|
|
||||||
return nil, nil, err1
|
|
||||||
}
|
|
||||||
payload := &binary.Container{
|
payload := &binary.Container{
|
||||||
PhoneRelay: &binary.PhoneRelayBody{
|
PhoneRelay: &binary.PhoneRelayBody{
|
||||||
Id: util.RandomUUIDv4(),
|
Id: util.RandomUUIDv4(),
|
||||||
Bugle: "Bugle",
|
Bugle: "Bugle",
|
||||||
RpcKey: decodedRpcKey,
|
RpcKey: rpcKey,
|
||||||
Date: &binary.Date{
|
Date: &binary.Date{
|
||||||
Year: 2023,
|
Year: 2023,
|
||||||
Seq1: 6,
|
Seq1: 6,
|
||||||
|
|
|
@ -23,7 +23,7 @@ func NewEncodedPayload(requestId string, opCode int64, encryptedData []byte, ses
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewAuthData(requestId string, rpcKey string, date *binary.Date) *binary.AuthMessage {
|
func NewAuthData(requestId string, rpcKey []byte, date *binary.Date) *binary.AuthMessage {
|
||||||
return &binary.AuthMessage{
|
return &binary.AuthMessage{
|
||||||
RequestId: requestId,
|
RequestId: requestId,
|
||||||
RpcKey: rpcKey,
|
RpcKey: rpcKey,
|
||||||
|
|
Loading…
Reference in a new issue