Reorganize protobuf schemas
This commit is contained in:
parent
8e5d76b1d3
commit
9680040ea1
45 changed files with 7086 additions and 7772 deletions
|
@ -193,10 +193,10 @@ func (c *Client) triggerEvent(evt interface{}) {
|
|||
}
|
||||
|
||||
func (c *Client) DownloadMedia(mediaID string, key []byte) ([]byte, error) {
|
||||
downloadMetadata := &gmproto.UploadImagePayload{
|
||||
MetaData: &gmproto.ImageMetaData{
|
||||
ImageID: mediaID,
|
||||
Encrypted: true,
|
||||
downloadMetadata := &gmproto.DownloadAttachmentRequest{
|
||||
Info: &gmproto.AttachmentInfo{
|
||||
AttachmentID: mediaID,
|
||||
Encrypted: true,
|
||||
},
|
||||
AuthData: &gmproto.AuthMessage{
|
||||
RequestID: uuid.NewString(),
|
||||
|
@ -304,7 +304,7 @@ func (c *Client) refreshAuthToken() error {
|
|||
return err
|
||||
}
|
||||
|
||||
payload, err := pblite.Marshal(&gmproto.RegisterRefreshPayload{
|
||||
payload, err := pblite.Marshal(&gmproto.RegisterRefreshRequest{
|
||||
MessageAuth: &gmproto.AuthMessage{
|
||||
RequestID: requestID,
|
||||
TachyonAuthToken: c.AuthData.TachyonAuthToken,
|
||||
|
@ -313,7 +313,7 @@ func (c *Client) refreshAuthToken() error {
|
|||
CurrBrowserDevice: c.AuthData.Browser,
|
||||
UnixTimestamp: timestamp,
|
||||
Signature: sig,
|
||||
EmptyRefreshArr: &gmproto.EmptyRefreshArr{EmptyArr: &gmproto.EmptyArr{}},
|
||||
EmptyRefreshArr: &gmproto.RegisterRefreshRequest_NestedEmptyArr{EmptyArr: &gmproto.EmptyArr{}},
|
||||
MessageType: 2, // hmm
|
||||
})
|
||||
if err != nil {
|
||||
|
|
|
@ -52,7 +52,7 @@ func (cb *ConversationBuilder) Build(protoMessage proto.Message) (proto.Message,
|
|||
}
|
||||
|
||||
switch protoMessage.(type) {
|
||||
case *gmproto.UpdateConversationPayload:
|
||||
case *gmproto.UpdateConversationRequest:
|
||||
payload, failedBuild := cb.buildUpdateConversationPayload()
|
||||
if failedBuild != nil {
|
||||
return nil, failedBuild
|
||||
|
@ -64,12 +64,12 @@ func (cb *ConversationBuilder) Build(protoMessage proto.Message) (proto.Message,
|
|||
return nil, &ConversationBuilderError{errMsg: "failed to build for unknown reasons"}
|
||||
}
|
||||
|
||||
func (cb *ConversationBuilder) buildUpdateConversationPayload() (*gmproto.UpdateConversationPayload, error) {
|
||||
func (cb *ConversationBuilder) buildUpdateConversationPayload() (*gmproto.UpdateConversationRequest, 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 := &gmproto.UpdateConversationPayload{}
|
||||
payload := &gmproto.UpdateConversationRequest{}
|
||||
|
||||
if cb.actionStatus != 0 {
|
||||
payload.Action = cb.actionStatus
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"go.mau.fi/mautrix-gmessages/libgm/gmproto"
|
||||
)
|
||||
|
||||
func (c *Client) ListConversations(count int64, folder gmproto.ListConversationsPayload_Folder) (*gmproto.Conversations, error) {
|
||||
payload := &gmproto.ListConversationsPayload{Count: count, Folder: folder}
|
||||
func (c *Client) ListConversations(count int64, folder gmproto.ListConversationsRequest_Folder) (*gmproto.ListConversationsResponse, error) {
|
||||
payload := &gmproto.ListConversationsRequest{Count: count, Folder: folder}
|
||||
//var actionType gmproto.ActionType
|
||||
//if !c.synced {
|
||||
// actionType = gmproto.ActionType_LIST_CONVERSATIONS_SYNC
|
||||
|
@ -13,11 +13,11 @@ func (c *Client) ListConversations(count int64, folder gmproto.ListConversations
|
|||
//} else {
|
||||
actionType := gmproto.ActionType_LIST_CONVERSATIONS
|
||||
|
||||
return typedResponse[*gmproto.Conversations](c.sessionHandler.sendMessage(actionType, payload))
|
||||
return typedResponse[*gmproto.ListConversationsResponse](c.sessionHandler.sendMessage(actionType, payload))
|
||||
}
|
||||
|
||||
func (c *Client) ListContacts() (*gmproto.ListContactsResponse, error) {
|
||||
payload := &gmproto.ListContactsPayload{
|
||||
payload := &gmproto.ListContactsRequest{
|
||||
I1: 1,
|
||||
I2: 350,
|
||||
I3: 50,
|
||||
|
@ -27,26 +27,26 @@ func (c *Client) ListContacts() (*gmproto.ListContactsResponse, error) {
|
|||
}
|
||||
|
||||
func (c *Client) ListTopContacts() (*gmproto.ListTopContactsResponse, error) {
|
||||
payload := &gmproto.ListTopContactsPayload{
|
||||
payload := &gmproto.ListTopContactsRequest{
|
||||
Count: 8,
|
||||
}
|
||||
actionType := gmproto.ActionType_LIST_TOP_CONTACTS
|
||||
return typedResponse[*gmproto.ListTopContactsResponse](c.sessionHandler.sendMessage(actionType, payload))
|
||||
}
|
||||
|
||||
func (c *Client) GetOrCreateConversation(req *gmproto.GetOrCreateConversationPayload) (*gmproto.GetOrCreateConversationResponse, error) {
|
||||
func (c *Client) GetOrCreateConversation(req *gmproto.GetOrCreateConversationRequest) (*gmproto.GetOrCreateConversationResponse, error) {
|
||||
actionType := gmproto.ActionType_GET_OR_CREATE_CONVERSATION
|
||||
return typedResponse[*gmproto.GetOrCreateConversationResponse](c.sessionHandler.sendMessage(actionType, req))
|
||||
}
|
||||
|
||||
func (c *Client) GetConversationType(conversationID string) (*gmproto.GetConversationTypeResponse, error) {
|
||||
payload := &gmproto.ConversationTypePayload{ConversationID: conversationID}
|
||||
payload := &gmproto.ConversationTypeRequest{ConversationID: conversationID}
|
||||
actionType := gmproto.ActionType_GET_CONVERSATION_TYPE
|
||||
return typedResponse[*gmproto.GetConversationTypeResponse](c.sessionHandler.sendMessage(actionType, payload))
|
||||
}
|
||||
|
||||
func (c *Client) GetConversation(conversationID string) (*gmproto.Conversation, error) {
|
||||
payload := &gmproto.GetConversationPayload{ConversationID: conversationID}
|
||||
payload := &gmproto.GetConversationRequest{ConversationID: conversationID}
|
||||
actionType := gmproto.ActionType_GET_CONVERSATION
|
||||
resp, err := typedResponse[*gmproto.GetConversationResponse](c.sessionHandler.sendMessage(actionType, payload))
|
||||
if err != nil {
|
||||
|
@ -56,7 +56,7 @@ func (c *Client) GetConversation(conversationID string) (*gmproto.Conversation,
|
|||
}
|
||||
|
||||
func (c *Client) FetchMessages(conversationID string, count int64, cursor *gmproto.Cursor) (*gmproto.FetchMessagesResponse, error) {
|
||||
payload := &gmproto.FetchConversationMessagesPayload{ConversationID: conversationID, Count: count}
|
||||
payload := &gmproto.FetchMessagesRequest{ConversationID: conversationID, Count: count}
|
||||
if cursor != nil {
|
||||
payload.Cursor = cursor
|
||||
}
|
||||
|
@ -64,19 +64,19 @@ func (c *Client) FetchMessages(conversationID string, count int64, cursor *gmpro
|
|||
return typedResponse[*gmproto.FetchMessagesResponse](c.sessionHandler.sendMessage(actionType, payload))
|
||||
}
|
||||
|
||||
func (c *Client) SendMessage(payload *gmproto.SendMessagePayload) (*gmproto.SendMessageResponse, error) {
|
||||
func (c *Client) SendMessage(payload *gmproto.SendMessageRequest) (*gmproto.SendMessageResponse, error) {
|
||||
actionType := gmproto.ActionType_SEND_MESSAGE
|
||||
return typedResponse[*gmproto.SendMessageResponse](c.sessionHandler.sendMessage(actionType, payload))
|
||||
}
|
||||
|
||||
func (c *Client) GetParticipantThumbnail(convID string) (*gmproto.ParticipantThumbnail, error) {
|
||||
payload := &gmproto.GetParticipantThumbnailPayload{ConversationID: convID}
|
||||
func (c *Client) GetParticipantThumbnail(convID string) (*gmproto.GetParticipantThumbnailResponse, error) {
|
||||
payload := &gmproto.GetParticipantThumbnailRequest{ConversationID: convID}
|
||||
actionType := gmproto.ActionType_GET_PARTICIPANTS_THUMBNAIL
|
||||
return typedResponse[*gmproto.ParticipantThumbnail](c.sessionHandler.sendMessage(actionType, payload))
|
||||
return typedResponse[*gmproto.GetParticipantThumbnailResponse](c.sessionHandler.sendMessage(actionType, payload))
|
||||
}
|
||||
|
||||
func (c *Client) UpdateConversation(convBuilder *ConversationBuilder) (*gmproto.UpdateConversationResponse, error) {
|
||||
data := &gmproto.UpdateConversationPayload{}
|
||||
data := &gmproto.UpdateConversationRequest{}
|
||||
|
||||
payload, buildErr := convBuilder.Build(data)
|
||||
if buildErr != nil {
|
||||
|
@ -89,7 +89,9 @@ func (c *Client) UpdateConversation(convBuilder *ConversationBuilder) (*gmproto.
|
|||
}
|
||||
|
||||
func (c *Client) SetTyping(convID string) error {
|
||||
payload := &gmproto.TypingUpdatePayload{Data: &gmproto.SetTypingIn{ConversationID: convID, Typing: true}}
|
||||
payload := &gmproto.TypingUpdateRequest{
|
||||
Data: &gmproto.TypingUpdateRequest_Data{ConversationID: convID, Typing: true},
|
||||
}
|
||||
actionType := gmproto.ActionType_TYPING_UPDATES
|
||||
|
||||
_, err := c.sessionHandler.sendMessage(actionType, payload)
|
||||
|
|
|
@ -12,7 +12,7 @@ type ClientReady struct {
|
|||
Conversations []*gmproto.Conversation
|
||||
}
|
||||
|
||||
func NewClientReady(sessionID string, conversationList *gmproto.Conversations) *ClientReady {
|
||||
func NewClientReady(sessionID string, conversationList *gmproto.ListConversationsResponse) *ClientReady {
|
||||
return &ClientReady{
|
||||
SessionID: sessionID,
|
||||
Conversations: conversationList.Conversations,
|
||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -3,18 +3,42 @@ package authentication;
|
|||
|
||||
option go_package = "../gmproto";
|
||||
|
||||
import "messages.proto";
|
||||
import "client.proto";
|
||||
import "util.proto";
|
||||
|
||||
enum BrowserType {
|
||||
UNKNOWN_BROWSER_TYPE = 0;
|
||||
OTHER = 1;
|
||||
CHROME = 2;
|
||||
FIREFOX = 3;
|
||||
SAFARI = 4;
|
||||
OPERA = 5;
|
||||
IE = 6;
|
||||
EDGE = 7;
|
||||
}
|
||||
|
||||
message BrowserDetails {
|
||||
string userAgent = 1;
|
||||
client.BrowserTypes browserType = 2;
|
||||
BrowserType browserType = 2;
|
||||
string OS = 3;
|
||||
bool someBool = 6;
|
||||
}
|
||||
|
||||
message Device {
|
||||
int64 userID = 1;
|
||||
string sourceID = 2;
|
||||
string network = 3;
|
||||
}
|
||||
|
||||
message ConfigVersion {
|
||||
int32 Year = 3;
|
||||
int32 Month = 4;
|
||||
int32 Day = 5;
|
||||
int32 V1 = 7;
|
||||
int32 V2 = 9;
|
||||
}
|
||||
|
||||
message AuthenticationContainer {
|
||||
messages.AuthMessage authMessage = 1;
|
||||
AuthMessage authMessage = 1;
|
||||
BrowserDetails browserDetails = 3;
|
||||
|
||||
oneof data {
|
||||
|
@ -23,16 +47,87 @@ message AuthenticationContainer {
|
|||
}
|
||||
}
|
||||
|
||||
message AuthMessage {
|
||||
string requestID = 1;
|
||||
optional string network = 3;
|
||||
optional bytes tachyonAuthToken = 6;
|
||||
ConfigVersion configVersion = 7;
|
||||
}
|
||||
|
||||
message RevokeRelayPairingRequest {
|
||||
AuthMessage authMessage = 1;
|
||||
Device browser = 2;
|
||||
}
|
||||
|
||||
message RevokeRelayPairingResponse {
|
||||
// field 1 is an object with an unknown int64 in field 2
|
||||
}
|
||||
|
||||
message RegisterRefreshRequest {
|
||||
message NestedEmptyArr {
|
||||
util.EmptyArr emptyArr = 9;
|
||||
}
|
||||
|
||||
AuthMessage messageAuth = 1;
|
||||
Device currBrowserDevice = 2;
|
||||
int64 unixTimestamp = 3;
|
||||
bytes signature = 4;
|
||||
NestedEmptyArr emptyRefreshArr = 13;
|
||||
int32 messageType = 16;
|
||||
}
|
||||
|
||||
message RegisterRefreshResponse {
|
||||
message AuthKeyData {
|
||||
bytes tachyonAuthToken = 1;
|
||||
string validFor = 2;
|
||||
}
|
||||
|
||||
AuthKeyData tokenData = 2;
|
||||
}
|
||||
|
||||
message RegisterPhoneRelayResponse {
|
||||
message AuthKeyData {
|
||||
bytes tachyonAuthToken = 1;
|
||||
int64 validFor = 2;
|
||||
}
|
||||
|
||||
CoordinateMessage coordinates = 1;
|
||||
Device browser = 2;
|
||||
bytes pairingKey = 3;
|
||||
int64 validFor = 4;
|
||||
AuthKeyData authKeyData = 5;
|
||||
string responseID = 6;
|
||||
}
|
||||
|
||||
message CoordinateMessage {
|
||||
int64 coord1 = 2;
|
||||
}
|
||||
|
||||
message RefreshPhoneRelayResponse {
|
||||
CoordinateMessage coordinates = 1;
|
||||
bytes pairKey = 2;
|
||||
int64 validFor = 3;
|
||||
}
|
||||
|
||||
message WebEncryptionKeyResponse {
|
||||
CoordinateMessage coordinates = 1;
|
||||
bytes key = 2;
|
||||
}
|
||||
|
||||
message ECDSAKeys {
|
||||
int64 field1 = 1; // idk?
|
||||
bytes encryptedKeys = 2;
|
||||
}
|
||||
|
||||
message CurrentDeviceData {
|
||||
authentication.Device browser = 1;
|
||||
}
|
||||
|
||||
message KeyData {
|
||||
messages.Device mobile = 1;
|
||||
Device mobile = 1;
|
||||
ECDSAKeys ecdsaKeys = 6;
|
||||
WebAuthKey webAuthKeyData = 2;
|
||||
messages.Device browser = 3;
|
||||
Device browser = 3;
|
||||
}
|
||||
|
||||
message WebAuthKey {
|
||||
|
@ -40,10 +135,6 @@ message WebAuthKey {
|
|||
int64 validFor = 2;
|
||||
}
|
||||
|
||||
message CurrentDeviceData {
|
||||
messages.Device browser = 1;
|
||||
}
|
||||
|
||||
message URLData {
|
||||
bytes pairingKey = 1;
|
||||
bytes AESKey = 2;
|
||||
|
@ -56,11 +147,11 @@ message TokenData {
|
|||
}
|
||||
|
||||
message PairedData {
|
||||
messages.Device mobile = 1;
|
||||
Device mobile = 1;
|
||||
TokenData tokenData = 2;
|
||||
messages.Device browser = 3;
|
||||
Device browser = 3;
|
||||
}
|
||||
|
||||
message RevokePairData {
|
||||
messages.Device revokedDevice = 1;
|
||||
Device revokedDevice = 1;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -3,72 +3,311 @@ package client;
|
|||
|
||||
option go_package = "../gmproto";
|
||||
|
||||
import "messages.proto";
|
||||
import "conversations.proto";
|
||||
import "authentication.proto";
|
||||
import "util.proto";
|
||||
|
||||
message NotifyDittoActivityPayload {
|
||||
message NotifyDittoActivityRequest {
|
||||
// This is not actually a boolean: after logging out, field 2 has value 2, and field 3 has value 1.
|
||||
bool success = 2;
|
||||
}
|
||||
|
||||
message MessageReadPayload {
|
||||
message NotifyDittoActivityResponse {}
|
||||
|
||||
message ReceiveMessagesRequest {
|
||||
authentication.AuthMessage auth = 1;
|
||||
|
||||
message UnknownEmptyObject1 {}
|
||||
message UnknownEmptyObject2 {
|
||||
UnknownEmptyObject1 unknown = 2;
|
||||
}
|
||||
optional UnknownEmptyObject2 unknown = 4;
|
||||
}
|
||||
|
||||
message MessageReadRequest {
|
||||
string conversationID = 2;
|
||||
string messageID = 3;
|
||||
}
|
||||
|
||||
message AckMessagePayload {
|
||||
messages.AuthMessage authData = 1;
|
||||
messages.EmptyArr emptyArr = 2;
|
||||
repeated AckMessageData acks = 4;
|
||||
message AckMessageRequest {
|
||||
message Message {
|
||||
string requestID = 1;
|
||||
authentication.Device device = 2;
|
||||
}
|
||||
|
||||
authentication.AuthMessage authData = 1;
|
||||
util.EmptyArr emptyArr = 2;
|
||||
repeated Message acks = 4;
|
||||
}
|
||||
|
||||
message AckMessageData {
|
||||
string requestID = 1;
|
||||
messages.Device device = 2;
|
||||
message DownloadAttachmentRequest {
|
||||
AttachmentInfo info = 1;
|
||||
authentication.AuthMessage authData = 2;
|
||||
}
|
||||
|
||||
message ImageMetaData {
|
||||
string imageID = 1;
|
||||
message AttachmentInfo {
|
||||
string attachmentID = 1;
|
||||
bool encrypted = 2;
|
||||
}
|
||||
|
||||
message UploadImagePayload {
|
||||
ImageMetaData metaData = 1;
|
||||
messages.AuthMessage authData = 2;
|
||||
message StartMediaUploadRequest {
|
||||
int64 attachmentType = 1;
|
||||
authentication.AuthMessage authData = 2;
|
||||
authentication.Device mobile = 3;
|
||||
}
|
||||
|
||||
message BugleBackendService {
|
||||
BugleCode data = 6;
|
||||
message UploadMediaResponse {
|
||||
UploadedMedia media = 1;
|
||||
string message = 2;
|
||||
}
|
||||
|
||||
message BugleCode {
|
||||
int64 type = 2;
|
||||
message UploadedMedia {
|
||||
string mediaID = 1;
|
||||
int64 mediaNumber = 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;
|
||||
message GetParticipantThumbnailRequest {
|
||||
string conversationID = 1;
|
||||
}
|
||||
|
||||
enum BrowserTypes {
|
||||
UNKNOWN_BROWSER_TYPE = 0;
|
||||
OTHER = 1;
|
||||
CHROME = 2;
|
||||
FIREFOX = 3;
|
||||
SAFARI = 4;
|
||||
OPERA = 5;
|
||||
IE = 6;
|
||||
EDGE = 7;
|
||||
message GetParticipantThumbnailResponse {
|
||||
repeated ParticipantThumbnail thumbnail = 1;
|
||||
}
|
||||
|
||||
message ParticipantThumbnail {
|
||||
string participantID = 1;
|
||||
ThumbnailData data = 2;
|
||||
}
|
||||
|
||||
message GetContactsThumbnailRequest {
|
||||
repeated string avatarIDs = 1;
|
||||
}
|
||||
|
||||
message ThumbnailData {
|
||||
bytes imageBuffer = 3;
|
||||
int32 someInt = 4;
|
||||
conversations.Dimensions dimensions = 5;
|
||||
}
|
||||
|
||||
message Cursor {
|
||||
string lastItemID = 1;
|
||||
int64 lastItemTimestamp = 2;
|
||||
}
|
||||
|
||||
message FetchMessagesRequest {
|
||||
string conversationID = 2;
|
||||
int64 count = 3;
|
||||
|
||||
Cursor cursor = 5;
|
||||
}
|
||||
|
||||
message FetchMessagesResponse {
|
||||
repeated conversations.Message messages = 2;
|
||||
bytes someBytes = 3;
|
||||
int64 totalMessages = 4;
|
||||
Cursor cursor = 5;
|
||||
}
|
||||
|
||||
message ListContactsRequest {
|
||||
int32 i1 = 5; // = 1
|
||||
int32 i2 = 6; // = 350
|
||||
int32 i3 = 7; // = 50
|
||||
}
|
||||
|
||||
message ListTopContactsRequest {
|
||||
int32 count = 1;
|
||||
}
|
||||
|
||||
message ListContactsResponse {
|
||||
repeated conversations.Contact contacts = 2;
|
||||
}
|
||||
|
||||
message ListTopContactsResponse {
|
||||
repeated conversations.Contact contacts = 1;
|
||||
}
|
||||
|
||||
message ListConversationsRequest {
|
||||
enum Folder {
|
||||
UNKNOWN = 0;
|
||||
INBOX = 1;
|
||||
ARCHIVE = 2;
|
||||
SPAM_BLOCKED = 5;
|
||||
}
|
||||
|
||||
int64 count = 2;
|
||||
Folder folder = 4;
|
||||
optional Cursor cursor = 5;
|
||||
}
|
||||
|
||||
message ListConversationsResponse {
|
||||
repeated conversations.Conversation conversations = 2;
|
||||
optional bytes cursorBytes = 3;
|
||||
optional Cursor cursor = 5;
|
||||
}
|
||||
|
||||
message GetOrCreateConversationRequest {
|
||||
repeated conversations.ContactNumber numbers = 2;
|
||||
optional string RCSGroupName = 3;
|
||||
optional bool createRCSGroup = 4;
|
||||
}
|
||||
|
||||
message GetOrCreateConversationResponse {
|
||||
enum Status {
|
||||
UNKNOWN = 0;
|
||||
SUCCESS = 1;
|
||||
CREATE_RCS = 3;
|
||||
}
|
||||
conversations.Conversation conversation = 2;
|
||||
Status status = 3;
|
||||
}
|
||||
|
||||
message DeleteMessageRequest {
|
||||
string messageID = 2;
|
||||
}
|
||||
|
||||
message DeleteMessageResponse {
|
||||
bool success = 2;
|
||||
}
|
||||
|
||||
message UpdateConversationRequest {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
message UpdateConversationResponse {
|
||||
bool success = 1;
|
||||
/*
|
||||
3 {
|
||||
1 {
|
||||
1 {
|
||||
3: "11"
|
||||
}
|
||||
13: 2
|
||||
}
|
||||
3: 1
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
message ConversationTypeRequest {
|
||||
string conversationID = 2;
|
||||
}
|
||||
|
||||
message GetConversationTypeResponse {
|
||||
string conversationID = 2;
|
||||
int32 type = 3;
|
||||
bool bool1 = 5;
|
||||
int32 number2 = 6;
|
||||
}
|
||||
|
||||
message GetConversationRequest {
|
||||
string conversationID = 1;
|
||||
}
|
||||
|
||||
message GetConversationResponse {
|
||||
conversations.Conversation conversation = 1;
|
||||
}
|
||||
|
||||
message OpenConversationRequest {
|
||||
string conversationID = 2;
|
||||
}
|
||||
|
||||
message PrepareOpenConversationRequest {
|
||||
int64 field2 = 2; // only seen value 1
|
||||
}
|
||||
|
||||
message IsBugleDefaultResponse {
|
||||
bool success = 1;
|
||||
}
|
||||
|
||||
message SendMessageRequest {
|
||||
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
|
||||
repeated conversations.MessageInfo messageInfo = 10;
|
||||
string tmpID2 = 12;
|
||||
}
|
||||
|
||||
message MessagePayloadContent {
|
||||
conversations.MessageContent messageContent = 1;
|
||||
}
|
||||
|
||||
message SendMessageResponse {
|
||||
int64 type = 3;
|
||||
}
|
||||
|
||||
message SendReactionRequest {
|
||||
enum Action {
|
||||
UNSPECIFIED = 0;
|
||||
ADD = 1;
|
||||
REMOVE = 2;
|
||||
SWITCH = 3;
|
||||
}
|
||||
|
||||
string messageID = 1;
|
||||
conversations.ReactionData reactionData = 2;
|
||||
Action action = 3;
|
||||
}
|
||||
|
||||
message SendReactionResponse {
|
||||
bool success = 1;
|
||||
}
|
||||
|
||||
message ResendMessageRequest {
|
||||
string messageID = 2;
|
||||
}
|
||||
|
||||
message TypingUpdateRequest {
|
||||
message Data {
|
||||
string conversationID = 1;
|
||||
bool typing = 3;
|
||||
}
|
||||
|
||||
Data data = 2;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -3,26 +3,6 @@ package conversations;
|
|||
|
||||
option go_package = "../gmproto";
|
||||
|
||||
import "reactions.proto";
|
||||
|
||||
message GetParticipantThumbnailPayload {
|
||||
string conversationID = 1;
|
||||
}
|
||||
|
||||
message ListContactsPayload {
|
||||
int32 i1 = 5; // = 1
|
||||
int32 i2 = 6; // = 350
|
||||
int32 i3 = 7; // = 50
|
||||
}
|
||||
|
||||
message ListTopContactsPayload {
|
||||
int32 count = 1;
|
||||
}
|
||||
|
||||
message GetContactsThumbnailPayload {
|
||||
repeated string avatarIDs = 1;
|
||||
}
|
||||
|
||||
message Contact {
|
||||
string ID = 1;
|
||||
string name = 2;
|
||||
|
@ -40,114 +20,6 @@ message ContactNumber {
|
|||
optional string formattedNumber = 4;
|
||||
}
|
||||
|
||||
message GetOrCreateConversationPayload {
|
||||
repeated ContactNumber numbers = 2;
|
||||
optional string RCSGroupName = 3;
|
||||
optional bool createRCSGroup = 4;
|
||||
}
|
||||
|
||||
message ResendMessagePayload {
|
||||
string messageID = 2;
|
||||
}
|
||||
|
||||
message GetConversationPayload {
|
||||
string conversationID = 1;
|
||||
}
|
||||
|
||||
message ConversationTypePayload {
|
||||
string conversationID = 2;
|
||||
}
|
||||
|
||||
message TypingUpdatePayload {
|
||||
SetTypingIn data = 2;
|
||||
}
|
||||
|
||||
message SetTypingIn {
|
||||
string conversationID = 1;
|
||||
bool typing = 3;
|
||||
}
|
||||
|
||||
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
|
||||
repeated MessageInfo messageInfo = 10;
|
||||
string tmpID2 = 12;
|
||||
}
|
||||
|
||||
message MessagePayloadContent {
|
||||
MessageContent messageContent = 1;
|
||||
}
|
||||
|
||||
message OpenConversationPayload {
|
||||
string conversationID = 2;
|
||||
}
|
||||
|
||||
message PrepareOpenConversationPayload {
|
||||
int64 field2 = 2; // only seen value 1
|
||||
}
|
||||
|
||||
message FetchConversationMessagesPayload {
|
||||
string conversationID = 2;
|
||||
int64 count = 3;
|
||||
|
||||
Cursor cursor = 5;
|
||||
}
|
||||
|
||||
message ListConversationsPayload {
|
||||
enum Folder {
|
||||
UNKNOWN = 0;
|
||||
INBOX = 1;
|
||||
ARCHIVE = 2;
|
||||
SPAM_BLOCKED = 5;
|
||||
}
|
||||
|
||||
int64 count = 2;
|
||||
Folder folder = 4;
|
||||
optional Cursor cursor = 5;
|
||||
}
|
||||
|
||||
message Cursor {
|
||||
string lastItemID = 1;
|
||||
int64 lastItemTimestamp = 2;
|
||||
}
|
||||
|
||||
message Message {
|
||||
string messageID = 1;
|
||||
MsgType msgType = 3;
|
||||
|
@ -160,10 +32,45 @@ message Message {
|
|||
string tmpID = 12;
|
||||
optional string subject = 14;
|
||||
int64 someInt = 16;
|
||||
repeated reactions.ReactionResponse reactions = 19;
|
||||
repeated ReactionEntry reactions = 19;
|
||||
optional ReplyMessage replyMessage = 21;
|
||||
}
|
||||
|
||||
message ReactionEntry {
|
||||
ReactionData data = 1;
|
||||
repeated string participantIDs = 2;
|
||||
}
|
||||
|
||||
enum EmojiType {
|
||||
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;
|
||||
}
|
||||
|
||||
message ReactionData {
|
||||
string unicode = 1;
|
||||
EmojiType type = 2;
|
||||
}
|
||||
|
||||
message EmojiMeta {
|
||||
repeated EmojiMetaData emojiMetaData = 1;
|
||||
}
|
||||
|
||||
message EmojiMetaData {
|
||||
string unicode = 1;
|
||||
repeated string names = 2;
|
||||
}
|
||||
|
||||
message ReplyMessage {
|
||||
string messageID = 1;
|
||||
string conversationID = 2; // might be participantID
|
||||
|
@ -175,7 +82,7 @@ message ReplyMessageData {
|
|||
}
|
||||
|
||||
message MessageInfo {
|
||||
string actionMessageID = 1;
|
||||
optional string actionMessageID = 1;
|
||||
oneof data {
|
||||
MessageContent messageContent = 2;
|
||||
MediaContent mediaContent = 3;
|
||||
|
@ -187,14 +94,14 @@ message MediaContent {
|
|||
string mediaID = 2;
|
||||
string mediaName = 4;
|
||||
int64 size = 5;
|
||||
Pixels pixels = 6;
|
||||
Dimensions dimensions = 6;
|
||||
bytes mediaData = 7;
|
||||
string mediaID2 = 9;
|
||||
bytes decryptionKey = 11;
|
||||
bytes decryptionKey2 = 12; // same value as decryptionkey?
|
||||
bytes decryptionKey2 = 12;
|
||||
}
|
||||
|
||||
message Pixels {
|
||||
message Dimensions {
|
||||
int64 width = 1;
|
||||
int64 height = 2;
|
||||
}
|
||||
|
@ -215,12 +122,6 @@ message MessageStatus {
|
|||
int64 thirdCode = 6;
|
||||
}
|
||||
|
||||
message Conversations {
|
||||
repeated Conversation conversations = 2;
|
||||
optional bytes cursorBytes = 3;
|
||||
optional Cursor cursor = 5;
|
||||
}
|
||||
|
||||
message Conversation {
|
||||
string conversationID = 1;
|
||||
string name = 2;
|
||||
|
@ -272,7 +173,7 @@ message SmallInfo {
|
|||
|
||||
message LatestMessage {
|
||||
string displayContent = 1;
|
||||
int64 fromMe = 2; // isMe?
|
||||
int64 fromMe = 2;
|
||||
|
||||
string displayName = 4;
|
||||
LatestMessageStatus latestMessageStatus = 5;
|
||||
|
@ -379,25 +280,6 @@ enum MessageStatusType {
|
|||
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;
|
||||
|
|
|
@ -116,97 +116,6 @@ 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 (
|
||||
|
@ -237,11 +146,11 @@ func (x TypingTypes) String() string {
|
|||
}
|
||||
|
||||
func (TypingTypes) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_events_proto_enumTypes[2].Descriptor()
|
||||
return file_events_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (TypingTypes) Type() protoreflect.EnumType {
|
||||
return &file_events_proto_enumTypes[2]
|
||||
return &file_events_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x TypingTypes) Number() protoreflect.EnumNumber {
|
||||
|
@ -250,7 +159,7 @@ func (x TypingTypes) Number() protoreflect.EnumNumber {
|
|||
|
||||
// Deprecated: Use TypingTypes.Descriptor instead.
|
||||
func (TypingTypes) EnumDescriptor() ([]byte, []int) {
|
||||
return file_events_proto_rawDescGZIP(), []int{2}
|
||||
return file_events_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type UpdateEvents struct {
|
||||
|
@ -780,40 +689,39 @@ func file_events_proto_rawDescGZIP() []byte {
|
|||
return file_events_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_events_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
||||
var file_events_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_events_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_events_proto_goTypes = []interface{}{
|
||||
(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
|
||||
(*RPCPairData)(nil), // 10: events.RPCPairData
|
||||
(*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
|
||||
(TypingTypes)(0), // 1: events.TypingTypes
|
||||
(*UpdateEvents)(nil), // 2: events.UpdateEvents
|
||||
(*ConversationEvent)(nil), // 3: events.ConversationEvent
|
||||
(*TypingEvent)(nil), // 4: events.TypingEvent
|
||||
(*MessageEvent)(nil), // 5: events.MessageEvent
|
||||
(*UserAlertEvent)(nil), // 6: events.UserAlertEvent
|
||||
(*TypingData)(nil), // 7: events.TypingData
|
||||
(*User)(nil), // 8: events.User
|
||||
(*RPCPairData)(nil), // 9: events.RPCPairData
|
||||
(*Settings)(nil), // 10: settings.Settings
|
||||
(*Conversation)(nil), // 11: conversations.Conversation
|
||||
(*Message)(nil), // 12: conversations.Message
|
||||
(*PairedData)(nil), // 13: authentication.PairedData
|
||||
(*RevokePairData)(nil), // 14: authentication.RevokePairData
|
||||
}
|
||||
var file_events_proto_depIdxs = []int32{
|
||||
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
|
||||
3, // 0: events.UpdateEvents.conversationEvent:type_name -> events.ConversationEvent
|
||||
5, // 1: events.UpdateEvents.messageEvent:type_name -> events.MessageEvent
|
||||
4, // 2: events.UpdateEvents.typingEvent:type_name -> events.TypingEvent
|
||||
10, // 3: events.UpdateEvents.settingsEvent:type_name -> settings.Settings
|
||||
6, // 4: events.UpdateEvents.userAlertEvent:type_name -> events.UserAlertEvent
|
||||
11, // 5: events.ConversationEvent.data:type_name -> conversations.Conversation
|
||||
7, // 6: events.TypingEvent.data:type_name -> events.TypingData
|
||||
12, // 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.RPCPairData.paired:type_name -> authentication.PairedData
|
||||
15, // 12: events.RPCPairData.revoked:type_name -> authentication.RevokePairData
|
||||
8, // 9: events.TypingData.user:type_name -> events.User
|
||||
1, // 10: events.TypingData.type:type_name -> events.TypingTypes
|
||||
13, // 11: events.RPCPairData.paired:type_name -> authentication.PairedData
|
||||
14, // 12: events.RPCPairData.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
|
||||
|
@ -943,7 +851,7 @@ func file_events_proto_init() {
|
|||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_events_proto_rawDesc,
|
||||
NumEnums: 3,
|
||||
NumEnums: 2,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
|
|
Binary file not shown.
|
@ -89,26 +89,6 @@ enum AlertType {
|
|||
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;
|
||||
|
|
|
@ -1,296 +0,0 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc v3.21.12
|
||||
// source: media.proto
|
||||
|
||||
package gmproto
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
import _ "embed"
|
||||
|
||||
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 StartMediaUploadPayload struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ImageType int64 `protobuf:"varint,1,opt,name=imageType,proto3" json:"imageType,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"`
|
||||
}
|
||||
|
||||
func (x *StartMediaUploadPayload) Reset() {
|
||||
*x = StartMediaUploadPayload{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *StartMediaUploadPayload) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*StartMediaUploadPayload) ProtoMessage() {}
|
||||
|
||||
func (x *StartMediaUploadPayload) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_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 StartMediaUploadPayload.ProtoReflect.Descriptor instead.
|
||||
func (*StartMediaUploadPayload) Descriptor() ([]byte, []int) {
|
||||
return file_media_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *StartMediaUploadPayload) GetImageType() int64 {
|
||||
if x != nil {
|
||||
return x.ImageType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *StartMediaUploadPayload) GetAuthData() *AuthMessage {
|
||||
if x != nil {
|
||||
return x.AuthData
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *StartMediaUploadPayload) GetMobile() *Device {
|
||||
if x != nil {
|
||||
return x.Mobile
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UploadMediaResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Media *Media `protobuf:"bytes,1,opt,name=media,proto3" json:"media,omitempty"`
|
||||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UploadMediaResponse) Reset() {
|
||||
*x = UploadMediaResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UploadMediaResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UploadMediaResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UploadMediaResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_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 UploadMediaResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UploadMediaResponse) Descriptor() ([]byte, []int) {
|
||||
return file_media_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *UploadMediaResponse) GetMedia() *Media {
|
||||
if x != nil {
|
||||
return x.Media
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UploadMediaResponse) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Media struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
MediaID string `protobuf:"bytes,1,opt,name=mediaID,proto3" json:"mediaID,omitempty"`
|
||||
MediaNumber int64 `protobuf:"varint,2,opt,name=mediaNumber,proto3" json:"mediaNumber,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Media) Reset() {
|
||||
*x = Media{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_media_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Media) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Media) ProtoMessage() {}
|
||||
|
||||
func (x *Media) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_media_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 Media.ProtoReflect.Descriptor instead.
|
||||
func (*Media) Descriptor() ([]byte, []int) {
|
||||
return file_media_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Media) GetMediaID() string {
|
||||
if x != nil {
|
||||
return x.MediaID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Media) GetMediaNumber() int64 {
|
||||
if x != nil {
|
||||
return x.MediaNumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_media_proto protoreflect.FileDescriptor
|
||||
|
||||
//go:embed media.pb.raw
|
||||
var file_media_proto_rawDesc []byte
|
||||
|
||||
var (
|
||||
file_media_proto_rawDescOnce sync.Once
|
||||
file_media_proto_rawDescData = file_media_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_media_proto_rawDescGZIP() []byte {
|
||||
file_media_proto_rawDescOnce.Do(func() {
|
||||
file_media_proto_rawDescData = protoimpl.X.CompressGZIP(file_media_proto_rawDescData)
|
||||
})
|
||||
return file_media_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_media_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_media_proto_goTypes = []interface{}{
|
||||
(*StartMediaUploadPayload)(nil), // 0: media.StartMediaUploadPayload
|
||||
(*UploadMediaResponse)(nil), // 1: media.UploadMediaResponse
|
||||
(*Media)(nil), // 2: media.Media
|
||||
(*AuthMessage)(nil), // 3: messages.AuthMessage
|
||||
(*Device)(nil), // 4: messages.Device
|
||||
}
|
||||
var file_media_proto_depIdxs = []int32{
|
||||
3, // 0: media.StartMediaUploadPayload.authData:type_name -> messages.AuthMessage
|
||||
4, // 1: media.StartMediaUploadPayload.mobile:type_name -> messages.Device
|
||||
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 input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_media_proto_init() }
|
||||
func file_media_proto_init() {
|
||||
if File_media_proto != nil {
|
||||
return
|
||||
}
|
||||
file_messages_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_media_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StartMediaUploadPayload); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_media_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UploadMediaResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_media_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Media); 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_media_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_media_proto_goTypes,
|
||||
DependencyIndexes: file_media_proto_depIdxs,
|
||||
MessageInfos: file_media_proto_msgTypes,
|
||||
}.Build()
|
||||
File_media_proto = out.File
|
||||
file_media_proto_rawDesc = nil
|
||||
file_media_proto_goTypes = nil
|
||||
file_media_proto_depIdxs = nil
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
|
||||
media.protomediamessages.proto"”
|
||||
StartMediaUploadPayload
|
||||
imageType (R imageType1
|
||||
authData (2.messages.AuthMessageRauthData(
|
||||
mobile (2.messages.DeviceRmobile"S
|
||||
UploadMediaResponse"
|
||||
media (2.media.MediaRmedia
|
||||
message ( Rmessage"C
|
||||
Media
|
||||
mediaID ( RmediaID
|
||||
mediaNumber (RmediaNumberBZ
|
||||
../gmprotobproto3
|
|
@ -1,22 +0,0 @@
|
|||
syntax = "proto3";
|
||||
package media;
|
||||
|
||||
option go_package = "../gmproto";
|
||||
|
||||
import "messages.proto";
|
||||
|
||||
message StartMediaUploadPayload {
|
||||
int64 imageType = 1;
|
||||
messages.AuthMessage authData = 2;
|
||||
messages.Device mobile = 3;
|
||||
}
|
||||
|
||||
message UploadMediaResponse {
|
||||
Media media = 1;
|
||||
string message = 2;
|
||||
}
|
||||
|
||||
message Media {
|
||||
string mediaID = 1;
|
||||
int64 mediaNumber = 2;
|
||||
}
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,618 +0,0 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc v3.21.12
|
||||
// source: reactions.proto
|
||||
|
||||
package gmproto
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
import _ "embed"
|
||||
|
||||
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 EmojiType int32
|
||||
|
||||
const (
|
||||
EmojiType_REACTION_TYPE_UNSPECIFIED EmojiType = 0
|
||||
EmojiType_LIKE EmojiType = 1
|
||||
EmojiType_LOVE EmojiType = 2
|
||||
EmojiType_LAUGH EmojiType = 3
|
||||
EmojiType_SURPRISED EmojiType = 4
|
||||
EmojiType_SAD EmojiType = 5
|
||||
EmojiType_ANGRY EmojiType = 6
|
||||
EmojiType_DISLIKE EmojiType = 7
|
||||
EmojiType_CUSTOM EmojiType = 8
|
||||
EmojiType_QUESTIONING EmojiType = 9
|
||||
EmojiType_CRYING_FACE EmojiType = 10
|
||||
EmojiType_POUTING_FACE EmojiType = 11
|
||||
EmojiType_RED_HEART EmojiType = 12
|
||||
)
|
||||
|
||||
// Enum value maps for EmojiType.
|
||||
var (
|
||||
EmojiType_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",
|
||||
}
|
||||
EmojiType_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 EmojiType) Enum() *EmojiType {
|
||||
p := new(EmojiType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x EmojiType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (EmojiType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_reactions_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (EmojiType) Type() protoreflect.EnumType {
|
||||
return &file_reactions_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x EmojiType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use EmojiType.Descriptor instead.
|
||||
func (EmojiType) 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
|
||||
|
||||
Unicode string `protobuf:"bytes,1,opt,name=unicode,proto3" json:"unicode,omitempty"`
|
||||
Type EmojiType `protobuf:"varint,2,opt,name=type,proto3,enum=reactions.EmojiType" json:"type,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) GetUnicode() string {
|
||||
if x != nil {
|
||||
return x.Unicode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ReactionData) GetType() EmojiType {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return EmojiType_REACTION_TYPE_UNSPECIFIED
|
||||
}
|
||||
|
||||
type ReactionResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *ReactionData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
ParticipantIDs []string `protobuf:"bytes,2,rep,name=participantIDs,proto3" json:"participantIDs,omitempty"`
|
||||
}
|
||||
|
||||
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) GetParticipantIDs() []string {
|
||||
if x != nil {
|
||||
return x.ParticipantIDs
|
||||
}
|
||||
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
|
||||
|
||||
Unicode string `protobuf:"bytes,1,opt,name=unicode,proto3" json:"unicode,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) GetUnicode() string {
|
||||
if x != nil {
|
||||
return x.Unicode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EmojiMetaData) GetNames() []string {
|
||||
if x != nil {
|
||||
return x.Names
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_reactions_proto protoreflect.FileDescriptor
|
||||
|
||||
//go:embed reactions.pb.raw
|
||||
var file_reactions_proto_rawDesc []byte
|
||||
|
||||
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
|
||||
(EmojiType)(0), // 1: reactions.EmojiType
|
||||
(*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
|
||||
1, // 2: reactions.ReactionData.type:type_name -> reactions.EmojiType
|
||||
4, // 3: reactions.ReactionResponse.data:type_name -> reactions.ReactionData
|
||||
7, // 4: reactions.EmojiMeta.emojiMetaData:type_name -> reactions.EmojiMetaData
|
||||
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_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
|
||||
}
|
Binary file not shown.
|
@ -1,56 +0,0 @@
|
|||
syntax = "proto3";
|
||||
package reactions;
|
||||
|
||||
option go_package = "../gmproto";
|
||||
|
||||
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 {
|
||||
string unicode = 1;
|
||||
EmojiType type = 2;
|
||||
}
|
||||
|
||||
message ReactionResponse {
|
||||
ReactionData data = 1;
|
||||
repeated string participantIDs = 2;
|
||||
}
|
||||
|
||||
message EmojiMeta {
|
||||
repeated EmojiMetaData emojiMetaData = 1;
|
||||
}
|
||||
|
||||
message EmojiMetaData {
|
||||
string unicode = 1;
|
||||
repeated string names = 2;
|
||||
}
|
||||
|
||||
enum EmojiType {
|
||||
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;
|
||||
}
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,134 +0,0 @@
|
|||
syntax = "proto3";
|
||||
package responses;
|
||||
|
||||
option go_package = "../gmproto";
|
||||
|
||||
import "events.proto";
|
||||
import "messages.proto";
|
||||
import "conversations.proto";
|
||||
|
||||
message ParticipantThumbnail {
|
||||
repeated Thumbnail thumbnail = 1;
|
||||
}
|
||||
|
||||
message Thumbnail {
|
||||
string participantId = 1;
|
||||
ThumbnailData data = 2;
|
||||
}
|
||||
|
||||
message ThumbnailData {
|
||||
bytes imageBuffer = 3;
|
||||
int32 someInt = 4;
|
||||
conversations.Pixels pixels = 5;
|
||||
}
|
||||
|
||||
message RegisterRefreshResponse {
|
||||
RefreshAuthData tokenData = 2;
|
||||
}
|
||||
|
||||
message RevokeRelayPairingResponse {
|
||||
// field 1 is an object with an unknown int64 in field 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 ListContactsResponse {
|
||||
repeated conversations.Contact contacts = 2;
|
||||
}
|
||||
|
||||
message ListTopContactsResponse {
|
||||
repeated conversations.Contact contacts = 1;
|
||||
}
|
||||
|
||||
message GetOrCreateConversationResponse {
|
||||
enum Status {
|
||||
UNKNOWN = 0;
|
||||
SUCCESS = 1;
|
||||
CREATE_RCS = 3;
|
||||
}
|
||||
conversations.Conversation conversation = 2;
|
||||
Status status = 3;
|
||||
}
|
||||
|
||||
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 GetConversationResponse {
|
||||
conversations.Conversation conversation = 1;
|
||||
}
|
||||
|
||||
message NotifyDittoActivityResponse {}
|
||||
|
||||
message IsBugleDefaultResponse {
|
||||
bool success = 1;
|
||||
}
|
||||
|
||||
message GetUpdatesResponse {
|
||||
events.UserAlertEvent data = 6;
|
||||
}
|
||||
|
||||
message SendMessageResponse {
|
||||
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;
|
||||
}
|
1183
libgm/gmproto/rpc.pb.go
Normal file
1183
libgm/gmproto/rpc.pb.go
Normal file
File diff suppressed because it is too large
Load diff
BIN
libgm/gmproto/rpc.pb.raw
Normal file
BIN
libgm/gmproto/rpc.pb.raw
Normal file
Binary file not shown.
|
@ -1,20 +1,10 @@
|
|||
syntax = "proto3";
|
||||
package messages;
|
||||
package rpc;
|
||||
|
||||
option go_package = "../gmproto";
|
||||
|
||||
message RegisterRefreshPayload {
|
||||
AuthMessage messageAuth = 1;
|
||||
Device currBrowserDevice = 2;
|
||||
int64 unixTimestamp = 3;
|
||||
bytes signature = 4;
|
||||
EmptyRefreshArr emptyRefreshArr = 13;
|
||||
int32 messageType = 16;
|
||||
}
|
||||
|
||||
message EmptyRefreshArr {
|
||||
EmptyArr emptyArr = 9;
|
||||
}
|
||||
import "authentication.proto";
|
||||
import "util.proto";
|
||||
|
||||
message StartAckMessage {
|
||||
optional int32 count = 1;
|
||||
|
@ -22,9 +12,9 @@ message StartAckMessage {
|
|||
|
||||
message LongPollingPayload {
|
||||
optional IncomingRPCMessage data = 2;
|
||||
optional EmptyArr heartbeat = 3;
|
||||
optional util.EmptyArr heartbeat = 3;
|
||||
optional StartAckMessage ack = 4;
|
||||
optional EmptyArr startRead = 5;
|
||||
optional util.EmptyArr startRead = 5;
|
||||
}
|
||||
|
||||
message IncomingRPCMessage {
|
||||
|
@ -35,8 +25,8 @@ message IncomingRPCMessage {
|
|||
MessageType messageType = 5;
|
||||
string finishExecute = 6;
|
||||
string millisecondsTaken = 7;
|
||||
Device mobile = 8;
|
||||
Device browser = 9;
|
||||
authentication.Device mobile = 8;
|
||||
authentication.Device browser = 9;
|
||||
|
||||
// Either a RPCMessageData or a RPCPairData encoded as bytes
|
||||
bytes messageData = 12;
|
||||
|
@ -56,113 +46,50 @@ message RPCMessageData {
|
|||
bool bool3 = 9;
|
||||
}
|
||||
|
||||
message RevokeRelayPairing {
|
||||
AuthMessage authMessage = 1;
|
||||
Device browser = 2;
|
||||
message OutgoingRPCMessage {
|
||||
message Auth {
|
||||
string requestID = 1;
|
||||
|
||||
bytes tachyonAuthToken = 6;
|
||||
authentication.ConfigVersion configVersion = 7;
|
||||
}
|
||||
|
||||
message Data {
|
||||
string requestID = 1;
|
||||
BugleRoute bugleRoute = 2;
|
||||
|
||||
// OutgoingRPCData encoded as bytes
|
||||
bytes messageData = 12;
|
||||
|
||||
message Type {
|
||||
util.EmptyArr emptyArr = 1;
|
||||
MessageType messageType = 2;
|
||||
}
|
||||
|
||||
Type messageTypeData = 23;
|
||||
}
|
||||
|
||||
authentication.Device mobile = 1;
|
||||
Data messageData = 2;
|
||||
Auth messageAuth = 3;
|
||||
|
||||
int64 TTL = 5;
|
||||
|
||||
util.EmptyArr emptyArr = 9;
|
||||
}
|
||||
|
||||
message SendMessage {
|
||||
Device mobile = 1;
|
||||
SendMessageData messageData = 2;
|
||||
SendMessageAuth messageAuth = 3;
|
||||
|
||||
int64 TTL = 5; // might be something related to config
|
||||
|
||||
EmptyArr emptyArr = 9;
|
||||
}
|
||||
|
||||
message SendMessageAuth {
|
||||
string requestID = 1;
|
||||
|
||||
bytes tachyonAuthToken = 6;
|
||||
ConfigVersion configVersion = 7;
|
||||
}
|
||||
|
||||
message SendMessageInternal {
|
||||
message OutgoingRPCData {
|
||||
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 protobufData = 12;
|
||||
|
||||
MessageTypeData messageTypeData = 23;
|
||||
}
|
||||
|
||||
message MessageTypeData {
|
||||
EmptyArr emptyArr = 1;
|
||||
MessageType messageType = 2;
|
||||
}
|
||||
|
||||
message EmptyArr {
|
||||
|
||||
}
|
||||
|
||||
message AuthMessage {
|
||||
string requestID = 1;
|
||||
optional string network = 3;
|
||||
optional bytes tachyonAuthToken = 6;
|
||||
ConfigVersion configVersion = 7;
|
||||
}
|
||||
|
||||
message ReceiveMessagesRequest {
|
||||
AuthMessage auth = 1;
|
||||
|
||||
message UnknownEmptyObject1 {}
|
||||
message UnknownEmptyObject2 {
|
||||
UnknownEmptyObject1 unknown = 2;
|
||||
}
|
||||
optional UnknownEmptyObject2 unknown = 4;
|
||||
}
|
||||
|
||||
message BaseData {
|
||||
int64 TTL = 2;
|
||||
EmptyArr emptyArr = 6;
|
||||
}
|
||||
|
||||
message Device {
|
||||
int64 userID = 1;
|
||||
string sourceID = 2;
|
||||
string network = 3;
|
||||
}
|
||||
|
||||
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 Year = 3;
|
||||
int32 Month = 4;
|
||||
int32 Day = 5;
|
||||
int32 V1 = 7;
|
||||
int32 V2 = 9;
|
||||
}
|
||||
|
||||
enum ActionType {
|
||||
UNSPECIFIED = 0;
|
129
libgm/gmproto/util.pb.go
Normal file
129
libgm/gmproto/util.pb.go
Normal file
|
@ -0,0 +1,129 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc v3.21.12
|
||||
// source: util.proto
|
||||
|
||||
package gmproto
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
import _ "embed"
|
||||
|
||||
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 EmptyArr struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *EmptyArr) Reset() {
|
||||
*x = EmptyArr{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_util_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EmptyArr) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EmptyArr) ProtoMessage() {}
|
||||
|
||||
func (x *EmptyArr) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_util_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 EmptyArr.ProtoReflect.Descriptor instead.
|
||||
func (*EmptyArr) Descriptor() ([]byte, []int) {
|
||||
return file_util_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
var File_util_proto protoreflect.FileDescriptor
|
||||
|
||||
//go:embed util.pb.raw
|
||||
var file_util_proto_rawDesc []byte
|
||||
|
||||
var (
|
||||
file_util_proto_rawDescOnce sync.Once
|
||||
file_util_proto_rawDescData = file_util_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_util_proto_rawDescGZIP() []byte {
|
||||
file_util_proto_rawDescOnce.Do(func() {
|
||||
file_util_proto_rawDescData = protoimpl.X.CompressGZIP(file_util_proto_rawDescData)
|
||||
})
|
||||
return file_util_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_util_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_util_proto_goTypes = []interface{}{
|
||||
(*EmptyArr)(nil), // 0: util.EmptyArr
|
||||
}
|
||||
var file_util_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_util_proto_init() }
|
||||
func file_util_proto_init() {
|
||||
if File_util_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_util_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EmptyArr); 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_util_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_util_proto_goTypes,
|
||||
DependencyIndexes: file_util_proto_depIdxs,
|
||||
MessageInfos: file_util_proto_msgTypes,
|
||||
}.Build()
|
||||
File_util_proto = out.File
|
||||
file_util_proto_rawDesc = nil
|
||||
file_util_proto_goTypes = nil
|
||||
file_util_proto_depIdxs = nil
|
||||
}
|
6
libgm/gmproto/util.pb.raw
Normal file
6
libgm/gmproto/util.pb.raw
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
|
||||
util.protoutil"
|
||||
|
||||
EmptyArrBZ
|
||||
../gmprotobproto3
|
8
libgm/gmproto/util.proto
Normal file
8
libgm/gmproto/util.proto
Normal file
|
@ -0,0 +1,8 @@
|
|||
syntax = "proto3";
|
||||
package util;
|
||||
|
||||
option go_package = "../gmproto";
|
||||
|
||||
message EmptyArr {
|
||||
|
||||
}
|
|
@ -4,20 +4,20 @@ import (
|
|||
"go.mau.fi/mautrix-gmessages/libgm/gmproto"
|
||||
)
|
||||
|
||||
func (c *Client) SendReaction(payload *gmproto.SendReactionPayload) (*gmproto.SendReactionResponse, error) {
|
||||
func (c *Client) SendReaction(payload *gmproto.SendReactionRequest) (*gmproto.SendReactionResponse, error) {
|
||||
actionType := gmproto.ActionType_SEND_REACTION
|
||||
return typedResponse[*gmproto.SendReactionResponse](c.sessionHandler.sendMessage(actionType, payload))
|
||||
}
|
||||
|
||||
func (c *Client) DeleteMessage(messageID string) (*gmproto.DeleteMessageResponse, error) {
|
||||
payload := &gmproto.DeleteMessagePayload{MessageID: messageID}
|
||||
payload := &gmproto.DeleteMessageRequest{MessageID: messageID}
|
||||
actionType := gmproto.ActionType_DELETE_MESSAGE
|
||||
|
||||
return typedResponse[*gmproto.DeleteMessageResponse](c.sessionHandler.sendMessage(actionType, payload))
|
||||
}
|
||||
|
||||
func (c *Client) MarkRead(conversationID, messageID string) error {
|
||||
payload := &gmproto.MessageReadPayload{ConversationID: conversationID, MessageID: messageID}
|
||||
payload := &gmproto.MessageReadRequest{ConversationID: conversationID, MessageID: messageID}
|
||||
actionType := gmproto.ActionType_MESSAGE_READ
|
||||
|
||||
_, err := c.sessionHandler.sendMessage(actionType, payload)
|
||||
|
|
|
@ -118,7 +118,7 @@ func (c *Client) Unpair() (*gmproto.RevokeRelayPairingResponse, error) {
|
|||
if c.AuthData.TachyonAuthToken == nil || c.AuthData.Browser == nil {
|
||||
return nil, nil
|
||||
}
|
||||
payload, err := proto.Marshal(&gmproto.RevokeRelayPairing{
|
||||
payload, err := proto.Marshal(&gmproto.RevokeRelayPairingRequest{
|
||||
AuthMessage: &gmproto.AuthMessage{
|
||||
RequestID: uuid.NewString(),
|
||||
TachyonAuthToken: c.AuthData.TachyonAuthToken,
|
||||
|
|
|
@ -13,8 +13,8 @@ import (
|
|||
)
|
||||
|
||||
type SendMessageBuilder struct {
|
||||
message *gmproto.SendMessage
|
||||
b64Message *gmproto.SendMessageInternal
|
||||
message *gmproto.OutgoingRPCMessage
|
||||
b64Message *gmproto.OutgoingRPCData
|
||||
|
||||
err error
|
||||
}
|
||||
|
@ -25,19 +25,19 @@ func (sm *SendMessageBuilder) Err() error {
|
|||
|
||||
func NewSendMessageBuilder(tachyonAuthToken []byte, pairedDevice *gmproto.Device, requestId string, sessionId string) *SendMessageBuilder {
|
||||
return &SendMessageBuilder{
|
||||
message: &gmproto.SendMessage{
|
||||
message: &gmproto.OutgoingRPCMessage{
|
||||
Mobile: pairedDevice,
|
||||
MessageData: &gmproto.SendMessageData{
|
||||
MessageData: &gmproto.OutgoingRPCMessage_Data{
|
||||
RequestID: requestId,
|
||||
},
|
||||
MessageAuth: &gmproto.SendMessageAuth{
|
||||
MessageAuth: &gmproto.OutgoingRPCMessage_Auth{
|
||||
RequestID: requestId,
|
||||
TachyonAuthToken: tachyonAuthToken,
|
||||
ConfigVersion: util.ConfigMessage,
|
||||
},
|
||||
EmptyArr: &gmproto.EmptyArr{},
|
||||
},
|
||||
b64Message: &gmproto.SendMessageInternal{
|
||||
b64Message: &gmproto.OutgoingRPCData{
|
||||
RequestID: requestId,
|
||||
SessionID: sessionId,
|
||||
},
|
||||
|
@ -80,7 +80,7 @@ func (sm *SendMessageBuilder) SetRoute(actionType gmproto.ActionType) *SendMessa
|
|||
}
|
||||
|
||||
func (sm *SendMessageBuilder) setMessageType(eventType gmproto.MessageType) *SendMessageBuilder {
|
||||
sm.message.MessageData.MessageTypeData = &gmproto.MessageTypeData{
|
||||
sm.message.MessageData.MessageTypeData = &gmproto.OutgoingRPCMessage_Data_Type{
|
||||
EmptyArr: &gmproto.EmptyArr{},
|
||||
MessageType: eventType,
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ func (sm *SendMessageBuilder) Build() ([]byte, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sm.message.MessageData.ProtobufData = encodedMessage
|
||||
sm.message.MessageData.MessageData = encodedMessage
|
||||
|
||||
protoJSONBytes, serializeErr := pblite.Marshal(sm.message)
|
||||
if serializeErr != nil {
|
||||
|
|
|
@ -6,7 +6,7 @@ var LIST_CONVERSATIONS_WITH_UPDATES = Route{
|
|||
Action: gmproto.ActionType_LIST_CONVERSATIONS,
|
||||
MessageType: gmproto.MessageType_BUGLE_ANNOTATION,
|
||||
BugleRoute: gmproto.BugleRoute_DataEvent,
|
||||
ResponseStruct: &gmproto.Conversations{},
|
||||
ResponseStruct: &gmproto.ListConversationsResponse{},
|
||||
UseSessionID: false,
|
||||
UseTTL: true,
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ var LIST_CONVERSATIONS = Route{
|
|||
Action: gmproto.ActionType_LIST_CONVERSATIONS,
|
||||
MessageType: gmproto.MessageType_BUGLE_MESSAGE,
|
||||
BugleRoute: gmproto.BugleRoute_DataEvent,
|
||||
ResponseStruct: &gmproto.Conversations{},
|
||||
ResponseStruct: &gmproto.ListConversationsResponse{},
|
||||
UseSessionID: false,
|
||||
UseTTL: true,
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ func (c *Client) IsBugleDefault() (*gmproto.IsBugleDefaultResponse, error) {
|
|||
}
|
||||
|
||||
func (c *Client) NotifyDittoActivity() error {
|
||||
payload := &gmproto.NotifyDittoActivityPayload{Success: true}
|
||||
payload := &gmproto.NotifyDittoActivityRequest{Success: true}
|
||||
actionType := gmproto.ActionType_NOTIFY_DITTO_ACTIVITY
|
||||
|
||||
_, err := c.sessionHandler.sendMessage(actionType, payload)
|
||||
|
|
|
@ -151,14 +151,14 @@ func (s *SessionHandler) sendAckRequest() {
|
|||
if len(dataToAck) == 0 {
|
||||
return
|
||||
}
|
||||
ackMessages := make([]*gmproto.AckMessageData, len(dataToAck))
|
||||
ackMessages := make([]*gmproto.AckMessageRequest_Message, len(dataToAck))
|
||||
for i, reqID := range dataToAck {
|
||||
ackMessages[i] = &gmproto.AckMessageData{
|
||||
ackMessages[i] = &gmproto.AckMessageRequest_Message{
|
||||
RequestID: reqID,
|
||||
Device: s.client.AuthData.Browser,
|
||||
}
|
||||
}
|
||||
ackMessagePayload := &gmproto.AckMessagePayload{
|
||||
ackMessagePayload := &gmproto.AckMessageRequest{
|
||||
AuthData: &gmproto.AuthMessage{
|
||||
RequestID: uuid.NewString(),
|
||||
TachyonAuthToken: s.client.AuthData.TachyonAuthToken,
|
||||
|
|
|
@ -48,7 +48,7 @@ func (c *Client) handleUpdatesEvent(msg *IncomingRPCMessage) {
|
|||
}
|
||||
|
||||
func (c *Client) handleClientReady(newSessionId string) {
|
||||
conversations, convErr := c.ListConversations(25, gmproto.ListConversationsPayload_INBOX)
|
||||
conversations, convErr := c.ListConversations(25, gmproto.ListConversationsRequest_INBOX)
|
||||
if convErr != nil {
|
||||
panic(convErr)
|
||||
}
|
||||
|
|
|
@ -229,8 +229,8 @@ func (c *Client) StartUploadMedia(encryptedImageBytes []byte, mime string) (*Sta
|
|||
}
|
||||
|
||||
func (c *Client) buildStartUploadPayload() (string, error) {
|
||||
protoData := &gmproto.StartMediaUploadPayload{
|
||||
ImageType: 1,
|
||||
protoData := &gmproto.StartMediaUploadRequest{
|
||||
AttachmentType: 1,
|
||||
AuthData: &gmproto.AuthMessage{
|
||||
RequestID: uuid.NewString(),
|
||||
TachyonAuthToken: c.AuthData.TachyonAuthToken,
|
||||
|
|
|
@ -14,7 +14,7 @@ var ConfigMessage = &gmproto.ConfigVersion{
|
|||
var Network = "Bugle"
|
||||
var BrowserDetailsMessage = &gmproto.BrowserDetails{
|
||||
UserAgent: UserAgent,
|
||||
BrowserType: gmproto.BrowserTypes_OTHER,
|
||||
BrowserType: gmproto.BrowserType_OTHER,
|
||||
OS: "libgm",
|
||||
SomeBool: true,
|
||||
}
|
||||
|
|
4
main.go
4
main.go
|
@ -68,11 +68,11 @@ func (br *GMBridge) Init() {
|
|||
br.RegisterCommands()
|
||||
|
||||
util.BrowserDetailsMessage.OS = br.Config.GoogleMessages.OS
|
||||
browserVal, ok := gmproto.BrowserTypes_value[br.Config.GoogleMessages.Browser]
|
||||
browserVal, ok := gmproto.BrowserType_value[br.Config.GoogleMessages.Browser]
|
||||
if !ok {
|
||||
br.ZLog.Error().Str("browser_value", br.Config.GoogleMessages.Browser).Msg("Invalid browser value")
|
||||
} else {
|
||||
util.BrowserDetailsMessage.BrowserType = gmproto.BrowserTypes(browserVal)
|
||||
util.BrowserDetailsMessage.BrowserType = gmproto.BrowserType(browserVal)
|
||||
}
|
||||
|
||||
Segment.log = br.ZLog.With().Str("component", "segment").Logger()
|
||||
|
|
16
portal.go
16
portal.go
|
@ -435,7 +435,7 @@ func (portal *Portal) handleGoogleDeletion(ctx context.Context, messageID string
|
|||
}
|
||||
}
|
||||
|
||||
func (portal *Portal) syncReactions(ctx context.Context, source *User, message *database.Message, reactions []*gmproto.ReactionResponse) {
|
||||
func (portal *Portal) syncReactions(ctx context.Context, source *User, message *database.Message, reactions []*gmproto.ReactionEntry) {
|
||||
log := zerolog.Ctx(ctx)
|
||||
existing, err := portal.bridge.DB.Reaction.GetAllByMessage(ctx, portal.Key, message.ID)
|
||||
if err != nil {
|
||||
|
@ -1172,9 +1172,9 @@ func (portal *Portal) uploadMedia(intent *appservice.IntentAPI, data []byte, con
|
|||
return nil
|
||||
}
|
||||
|
||||
func (portal *Portal) convertMatrixMessage(ctx context.Context, sender *User, content *event.MessageEventContent, txnID string) (*gmproto.SendMessagePayload, error) {
|
||||
func (portal *Portal) convertMatrixMessage(ctx context.Context, sender *User, content *event.MessageEventContent, txnID string) (*gmproto.SendMessageRequest, error) {
|
||||
log := zerolog.Ctx(ctx)
|
||||
req := &gmproto.SendMessagePayload{
|
||||
req := &gmproto.SendMessageRequest{
|
||||
ConversationID: portal.ID,
|
||||
TmpID: txnID,
|
||||
MessagePayload: &gmproto.MessagePayload{
|
||||
|
@ -1349,11 +1349,11 @@ func (portal *Portal) handleMatrixReaction(sender *User, evt *event.Event) error
|
|||
}
|
||||
|
||||
emoji := variationselector.Remove(content.RelatesTo.Key)
|
||||
action := gmproto.Reaction_ADD
|
||||
action := gmproto.SendReactionRequest_ADD
|
||||
if existingReaction != nil {
|
||||
action = gmproto.Reaction_SWITCH
|
||||
action = gmproto.SendReactionRequest_SWITCH
|
||||
}
|
||||
resp, err := sender.Client.SendReaction(&gmproto.SendReactionPayload{
|
||||
resp, err := sender.Client.SendReaction(&gmproto.SendReactionRequest{
|
||||
MessageID: msg.ID,
|
||||
ReactionData: gmproto.MakeReactionData(emoji),
|
||||
Action: action,
|
||||
|
@ -1425,10 +1425,10 @@ func (portal *Portal) handleMatrixReactionRedaction(ctx context.Context, sender
|
|||
return errTargetNotFound
|
||||
}
|
||||
|
||||
resp, err := sender.Client.SendReaction(&gmproto.SendReactionPayload{
|
||||
resp, err := sender.Client.SendReaction(&gmproto.SendReactionRequest{
|
||||
MessageID: existingReaction.MessageID,
|
||||
ReactionData: gmproto.MakeReactionData(existingReaction.Reaction),
|
||||
Action: gmproto.Reaction_REMOVE,
|
||||
Action: gmproto.SendReactionRequest_REMOVE,
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to send reaction removal: %w", err)
|
||||
|
|
|
@ -195,7 +195,7 @@ func (prov *ProvisioningAPI) StartChat(w http.ResponseWriter, r *http.Request) {
|
|||
ErrCode: "bad json",
|
||||
})
|
||||
}
|
||||
var reqData gmproto.GetOrCreateConversationPayload
|
||||
var reqData gmproto.GetOrCreateConversationRequest
|
||||
reqData.Numbers = make([]*gmproto.ContactNumber, 0, len(req.Numbers))
|
||||
for _, number := range req.Numbers {
|
||||
reqData.Numbers = append(reqData.Numbers, &gmproto.ContactNumber{
|
||||
|
|
Loading…
Reference in a new issue