gmessages/libgm/binary/raw/conversations.proto

200 lines
3.8 KiB
Protocol Buffer
Raw Normal View History

2023-06-30 09:54:08 +00:00
syntax = "proto3";
package conversations;
option go_package = "../../binary";
message SendMessagePayload {
2023-06-30 13:26:46 +00:00
string conversationID = 2;
2023-06-30 09:54:08 +00:00
MessagePayload messagePayload = 3;
2023-06-30 13:26:46 +00:00
string tmpID = 5;
2023-06-30 09:54:08 +00:00
}
message MessagePayload {
2023-06-30 13:26:46 +00:00
string tmpID = 1;
2023-06-30 09:54:08 +00:00
MessagePayloadContent messagePayloadContent = 6;
2023-06-30 13:26:46 +00:00
string conversationID = 7;
string selfParticipantID = 9; // might be participantId
2023-06-30 09:54:08 +00:00
repeated MessageInfo messageInfo = 10;
2023-06-30 13:26:46 +00:00
string tmpID2 = 12;
2023-06-30 09:54:08 +00:00
}
message MessagePayloadContent {
MessageContent messageContent = 1;
}
message OpenConversationPayload {
2023-06-30 13:26:46 +00:00
string conversationID = 2;
2023-06-30 09:54:08 +00:00
}
message PrepareOpenConversationPayload {
int64 field2 = 2; // only seen value 1
}
message FetchConversationMessagesPayload {
2023-06-30 13:26:46 +00:00
string conversationID = 2;
2023-06-30 09:54:08 +00:00
int64 count = 3;
Cursor cursor = 5;
}
message ListCoversationsPayload {
int64 count = 2; // no idea if this is actually amount to list
int64 field4 = 4; // no idea what this is , but only value ive seen is 1
}
message FetchMessagesResponse {
repeated Message messages = 2;
bytes someBytes = 3;
int64 totalMessages = 4;
Cursor cursor = 5;
}
message Cursor {
string someStr = 1;
int64 nextCursor = 2;
}
enum MessageType {
UNKNOWN = 0;
TEXT = 1;
IMAGE = 2;
VIDEO = 3;
AUDIO = 4;
ATTACHMENT = 5;
LOCATION = 6;
RICH_CARD = 7;
VCARD = 8;
MMS_NEEDS_DOWNLOAD = 9;
REPLY = 10;
}
message Message {
2023-06-30 13:26:46 +00:00
string messageID = 1;
2023-06-30 09:54:08 +00:00
IsFromMe from = 3;
MessageStatus messageStatus = 4;
int64 timestamp = 5;
2023-06-30 13:26:46 +00:00
string conversationID = 7;
string participantID = 9;
2023-06-30 09:54:08 +00:00
repeated MessageInfo messageInfo = 10;
MessageType type = 11;
string tmpId = 12;
}
message MessageInfo {
string orderInternal = 1;
oneof data {
MessageContent messageContent = 2;
ImageContent imageContent = 3;
}
}
message ImageContent {
int64 someNumber = 1;
2023-06-30 13:26:46 +00:00
string imageID = 2;
2023-06-30 09:54:08 +00:00
string imageName = 4;
int64 size = 5;
ImagePixels pixels = 6;
bytes imageData = 7;
2023-06-30 13:26:46 +00:00
string imageID2 = 9;
2023-06-30 09:54:08 +00:00
bytes decryptionKey = 11;
bytes decryptionKey2 = 12; // same value as decryptionkey?
}
message ImagePixels {
int64 width = 1;
int64 height = 2;
}
message MessageContent {
string content = 1;
}
message IsFromMe {
bool fromMe = 1;
}
enum MsgStatusCode {
UNKNOWN_STATUS = 0;
SENT = 1;
2023-07-01 09:52:53 +00:00
SENDING = 5;
READ = 11;
2023-06-30 09:54:08 +00:00
}
message MessageStatus {
/*
// MMS / SMS
UNKNOWN_STATUS = 0;
SENDING = 5;
SENT = 1;
// RCS
READ|SEEN = 11;
*/
2023-07-01 09:52:53 +00:00
MsgStatusCode code = 2;
2023-06-30 09:54:08 +00:00
string errMsg = 4;
string msgStatus = 5;
}
message Conversations {
repeated Conversation conversations = 2;
}
message Conversation {
2023-06-30 13:26:46 +00:00
string conversationID = 1;
2023-06-30 09:54:08 +00:00
string name = 2;
LatestMessage latestMessage = 4;
2023-06-30 13:26:46 +00:00
int64 timestampMS = 5;
2023-06-30 09:54:08 +00:00
bool isGroupChat = 10; // not certain
2023-06-30 13:26:46 +00:00
string selfParticipantID = 11;
2023-06-30 09:54:08 +00:00
/*
1 = unarchived
2 = archived
3 = deleted
*/
//bool bool1 = 13;
int64 status = 12;
string hashHex = 15;
2023-06-30 13:26:46 +00:00
string messageID = 17;
2023-06-30 09:54:08 +00:00
repeated Participant participants = 20;
repeated string otherParticipants = 21; // participant ids excluding me
int64 type = 22;
}
message Participant {
2023-07-01 15:19:47 +00:00
UserIdentifier id = 1;
2023-07-02 14:21:39 +00:00
string firstName = 2;
string fullName = 3;
2023-07-01 15:19:47 +00:00
string color = 5;
2023-06-30 09:54:08 +00:00
bool isMe = 6;
Muted muted = 7;
//bool bool2 = 8;
2023-07-01 15:19:47 +00:00
string avatarID = 10;
// bool bool3 = 11;
2023-06-30 09:54:08 +00:00
int64 bs = 14;
2023-07-01 15:19:47 +00:00
string formattedNumber = 15;
2023-06-30 09:54:08 +00:00
}
2023-07-01 15:19:47 +00:00
message UserIdentifier {
2023-06-30 09:54:08 +00:00
int64 type = 1;
string number = 2;
2023-06-30 13:26:46 +00:00
string participantID = 3;
2023-06-30 09:54:08 +00:00
}
message LatestMessage {
string content = 1;
bool fromMe = 2; // isMe?
2023-06-30 13:00:52 +00:00
2023-06-30 09:54:08 +00:00
string displayName = 4;
//Unknown unknown = 5;
}
message Unknown {
int64 field1 = 1;
int64 field2 = 2;
}
message Muted {
bool isMuted = 1;
2023-06-30 13:00:52 +00:00
}