gmessages/libgm/gmproto/conversations.proto

377 lines
9.5 KiB
Protocol Buffer
Raw Normal View History

2023-06-30 09:54:08 +00:00
syntax = "proto3";
package conversations;
2023-07-17 13:51:31 +00:00
option go_package = "../gmproto";
2023-06-30 09:54:08 +00:00
message Contact {
2023-09-04 22:18:01 +00:00
string participantID = 1;
string name = 2;
ContactNumber number = 3;
string avatarHexColor = 7;
bool unknownBool = 10;
2023-09-04 22:18:01 +00:00
string contactID = 11;
}
message ContactNumber {
// Might be 2 for contact and 7 for user input?
int32 mysteriousInt = 1;
string number = 2;
string number2 = 3;
optional string formattedNumber = 4;
}
2023-06-30 09:54:08 +00:00
message Message {
2023-06-30 13:26:46 +00:00
string messageID = 1;
MsgType msgType = 3;
2023-06-30 09:54:08 +00:00
MessageStatus messageStatus = 4;
int64 timestamp = 5; // check this
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;
int64 type = 11;
string tmpID = 12;
2023-07-15 16:55:46 +00:00
optional string subject = 14;
int64 someInt = 16;
2023-07-17 23:57:20 +00:00
repeated ReactionEntry reactions = 19;
2023-07-15 16:55:46 +00:00
optional ReplyMessage replyMessage = 21;
}
2023-07-17 23:57:20 +00:00
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;
EMOTIFY = 13;
}
message CustomEmojiData {
message Inner {
optional string unknownString = 100;
message ImageData {
string mimeType = 1;
string uri = 2;
optional int32 unknownInt3 = 3;
optional string unknownString5 = 5;
}
message WrappedImageData {
message ImageData {
int32 unknownInt1 = 1;
string mimeType = 2;
string uri = 3;
int32 width = 5;
int32 height = 6;
optional int32 unknownInt7 = 7;
}
ImageData data = 1;
}
ImageData first = 101;
WrappedImageData second = 102;
}
string uuid = 1;
optional int32 unknownInt4 = 4;
Inner innerData = 100;
2023-07-17 23:57:20 +00:00
}
message ReactionData {
string unicode = 1;
EmojiType type = 2;
CustomEmojiData customEmoji = 101;
2023-07-17 23:57:20 +00:00
}
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
ReplyMessageData replyMessageData = 3;
}
message ReplyMessageData {
2023-06-30 09:54:08 +00:00
}
message MessageInfo {
2023-07-17 23:57:20 +00:00
optional string actionMessageID = 1;
2023-06-30 09:54:08 +00:00
oneof data {
MessageContent messageContent = 2;
MediaContent mediaContent = 3;
2023-06-30 09:54:08 +00:00
}
}
message MediaContent {
MediaFormats format = 1;
string mediaID = 2;
string mediaName = 4;
2023-06-30 09:54:08 +00:00
int64 size = 5;
2023-07-17 23:57:20 +00:00
Dimensions dimensions = 6;
bytes mediaData = 7;
string mediaID2 = 9;
2023-06-30 09:54:08 +00:00
bytes decryptionKey = 11;
2023-07-17 23:57:20 +00:00
bytes decryptionKey2 = 12;
string mimeType = 14;
2023-06-30 09:54:08 +00:00
}
2023-07-17 23:57:20 +00:00
message Dimensions {
2023-06-30 09:54:08 +00:00
int64 width = 1;
int64 height = 2;
}
message MessageContent {
string content = 1;
}
message MsgType {
int64 type = 1;
2023-06-30 09:54:08 +00:00
}
message MessageStatus {
MessageStatusType status = 2;
int64 subCode = 3;
2023-06-30 09:54:08 +00:00
string errMsg = 4;
string statusText = 5;
int64 thirdCode = 6;
2023-06-30 09:54:08 +00:00
}
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;
int64 lastMessageTimestamp = 5;
2023-07-14 23:17:36 +00:00
bool unread = 6;
2023-06-30 09:54:08 +00:00
bool isGroupChat = 10; // not certain
string defaultOutgoingID = 11;
2023-07-24 13:46:54 +00:00
ConversationStatus status = 12;
bool readOnly = 13;
string avatarHexColor = 15;
string latestMessageID = 17;
2023-06-30 09:54:08 +00:00
repeated Participant participants = 20;
repeated string otherParticipants = 21; // participant ids excluding me
ConversationType type = 22;
bool subType = 24;
bool pinned = 26;
2023-07-14 23:17:36 +00:00
int64 unknownTimestamp = 28; // set to lastMessageTimestamp + 1000 when marking as unread?
bool thirdType = 29;
2023-06-30 09:54:08 +00:00
}
message Participant {
SmallInfo ID = 1;
2023-07-02 14:21:39 +00:00
string firstName = 2;
string fullName = 3;
string avatarHexColor = 5;
2023-06-30 09:54:08 +00:00
bool isMe = 6;
Muted muted = 7;
bool isVisible = 8;
2023-09-04 22:18:01 +00:00
string contactID = 10;
2023-06-30 09:54:08 +00:00
int64 bs = 14;
2023-07-01 15:19:47 +00:00
string formattedNumber = 15;
int64 someInt1 = 19;
int64 someInt2 = 20;
2023-06-30 09:54:08 +00:00
}
enum IdentifierType {
UNKNOWN = 0;
PHONE = 1;
EMAIL = 2;
}
message SmallInfo {
IdentifierType type = 1;
2023-06-30 09:54:08 +00:00
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 displayContent = 1;
2023-07-17 23:57:20 +00:00
int64 fromMe = 2;
2023-06-30 13:00:52 +00:00
2023-06-30 09:54:08 +00:00
string displayName = 4;
LatestMessageStatus latestMessageStatus = 5;
2023-06-30 09:54:08 +00:00
}
message LatestMessageStatus {
int64 status2 = 1;
MessageStatusType status = 2;
2023-06-30 09:54:08 +00:00
}
message Muted {
int64 isMuted = 1;
}
enum ConversationType {
UNKNOWN_CONVERSATION_TYPE = 0;
SMS = 1;
RCS = 2;
2023-06-30 13:00:52 +00:00
}
enum MessageStatusType {
STATUS_UNKNOWN = 0;
2023-07-09 20:59:22 +00:00
OUTGOING_COMPLETE = 1;
OUTGOING_DELIVERED = 2;
OUTGOING_DISPLAYED = 11;
OUTGOING_DRAFT = 3;
OUTGOING_SEND_AFTER_PROCESSING = 10;
OUTGOING_YET_TO_SEND = 4;
OUTGOING_SENDING = 5;
OUTGOING_RESENDING = 6;
OUTGOING_AWAITING_RETRY = 7;
OUTGOING_FAILED_GENERIC = 8;
OUTGOING_FAILED_EMERGENCY_NUMBER = 9;
OUTGOING_CANCELED = 12;
OUTGOING_FAILED_TOO_LARGE = 13;
OUTGOING_NOT_DELIVERED_YET = 14;
OUTGOING_REVOCATION_PENDING = 15;
OUTGOING_SCHEDULED = 16;
OUTGOING_FAILED_RECIPIENT_LOST_RCS = 17;
OUTGOING_FAILED_NO_RETRY_NO_FALLBACK = 18;
OUTGOING_FAILED_RECIPIENT_DID_NOT_DECRYPT = 19;
OUTGOING_VALIDATING = 20;
OUTGOING_FAILED_RECIPIENT_LOST_ENCRYPTION = 21;
OUTGOING_FAILED_RECIPIENT_DID_NOT_DECRYPT_NO_MORE_RETRY = 22;
2023-07-09 20:59:22 +00:00
INCOMING_COMPLETE = 100;
INCOMING_YET_TO_MANUAL_DOWNLOAD = 101;
INCOMING_RETRYING_MANUAL_DOWNLOAD = 102;
INCOMING_MANUAL_DOWNLOADING = 103;
INCOMING_RETRYING_AUTO_DOWNLOAD = 104;
INCOMING_AUTO_DOWNLOADING = 105;
INCOMING_DOWNLOAD_FAILED = 106;
INCOMING_EXPIRED_OR_NOT_AVAILABLE = 107;
INCOMING_DELIVERED = 108;
INCOMING_DISPLAYED = 109;
INCOMING_DOWNLOAD_CANCELED = 110;
INCOMING_DOWNLOAD_FAILED_TOO_LARGE = 111;
INCOMING_DOWNLOAD_FAILED_SIM_HAS_NO_DATA = 112;
INCOMING_FAILED_TO_DECRYPT = 113;
INCOMING_DECRYPTION_ABORTED = 114;
2023-07-09 20:59:22 +00:00
TOMBSTONE_PARTICIPANT_JOINED = 200;
TOMBSTONE_PARTICIPANT_LEFT = 201;
TOMBSTONE_SELF_LEFT = 202;
TOMBSTONE_RCS_GROUP_CREATED = 203;
TOMBSTONE_MMS_GROUP_CREATED = 204;
TOMBSTONE_SMS_BROADCAST_CREATED = 205;
TOMBSTONE_ONE_ON_ONE_SMS_CREATED = 206;
TOMBSTONE_ONE_ON_ONE_RCS_CREATED = 207;
TOMBSTONE_SWITCH_TO_GROUP_MMS = 208;
TOMBSTONE_SWITCH_TO_BROADCAST_SMS = 209;
TOMBSTONE_SHOW_LINK_PREVIEWS = 210;
TOMBSTONE_GROUP_RENAMED_LOCAL = 211;
TOMBSTONE_VERIFIED_SMS_APPLICABLE = 212;
TOMBSTONE_ENCRYPTED_ONE_ON_ONE_RCS_CREATED = 213;
TOMBSTONE_PROTOCOL_SWITCH_TO_TEXT = 214;
TOMBSTONE_PROTOCOL_SWITCH_TO_RCS = 215;
TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS = 216;
TOMBSTONE_GROUP_RENAMED_GLOBAL = 217;
TOMBSTONE_GROUP_NAME_CLEARED_GLOBAL = 218;
TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS_INFO = 219;
TOMBSTONE_SELF_REMOVED_FROM_GROUP = 220;
MESSAGE_STATUS_TOMBSTONE_PARTICIPANT_REMOVED_FROM_GROUP = 221;
MESSAGE_STATUS_TOMBSTONE_SMS_NORM_PARTICIPANT_UPGRADED = 222;
MESSAGE_STATUS_TOMBSTONE_RCS_NORM_PARTICIPANT_UPGRADED = 223;
MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_RCS_NORM_PARTICIPANT_UPGRADED = 224;
MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_JOINED = 225;
MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_JOINED_INFO = 226;
MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_PARTICIPANT_LEFT = 227;
MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_SELF_LEFT = 228;
MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_CREATED = 229;
MESSAGE_STATUS_TOMBSTONE_SELF_REMOVED_FROM_ENCRYPTED_GROUP = 230;
MESSAGE_STATUS_TOMBSTONE_PARTICIPANT_REMOVED_FROM_ENCRYPTED_GROUP = 231;
MESSAGE_STATUS_TOMBSTONE_SUGGESTION_SHORTCUT_STAR_TOOLSTONE = 232;
MESSAGE_STATUS_TOMBSTONE_GROUP_PROTOCOL_SWITCH_RCS_TO_E2EE = 233;
MESSAGE_STATUS_TOMBSTONE_GROUP_PROTOCOL_SWITCH_E2EE_TO_RCS = 234;
MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_TEXT_TO_E2EE = 235;
MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_E2EE_TO_TEXT = 236;
MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_RCS_TO_E2EE = 237;
MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_E2EE_TO_RCS = 238;
MESSAGE_STATUS_TOMBSTONE_SATELLITE_EDUCATION = 239;
2023-07-09 20:59:22 +00:00
MESSAGE_DELETED = 300;
}
2023-07-24 13:46:54 +00:00
enum ConversationStatus {
UNKNOWN_CONVERSATION_STATUS = 0;
ACTIVE = 1;
ARCHIVED = 2;
DELETED = 3;
2023-07-24 13:46:54 +00:00
KEEP_ARCHIVED = 4;
SPAM_FOLDER = 5;
BLOCKED_FOLDER = 6;
}
enum MediaFormats {
UNSPECIFIED_TYPE = 0;
IMAGE_JPEG = 1;
IMAGE_JPG = 2;
IMAGE_PNG = 3;
IMAGE_GIF = 4;
IMAGE_WBMP = 5;
IMAGE_X_MS_BMP = 6;
IMAGE_UNSPECIFIED = 7;
VIDEO_MP4 = 8;
VIDEO_3G2 = 9;
VIDEO_3GPP = 10;
VIDEO_WEBM = 11;
VIDEO_MKV = 12;
VIDEO_UNSPECIFIED = 13;
AUDIO_AAC = 14;
AUDIO_AMR = 15;
AUDIO_MP3 = 16;
AUDIO_MPEG = 17;
AUDIO_MPG = 18;
AUDIO_MP4 = 19;
AUDIO_MP4_LATM = 20;
AUDIO_3GPP = 21;
AUDIO_OGG = 22;
AUDIO_UNSPECIFIED = 23;
TEXT_VCARD = 24;
APP_PDF = 25;
APP_TXT = 26;
APP_HTML = 27;
APP_DOC = 28;
APP_DOCX = 29;
APP_PPTX = 30;
APP_PPT = 31;
APP_XLSX = 32;
APP_XLS = 33;
APP_APK = 34;
APP_ZIP = 35;
APP_JAR = 36;
APP_UNSPECIFIED = 37;
CAL_TEXT_VCALENDAR = 38;
CAL_TEXT_XVCALENDAR = 39;
CAL_TEXT_CALENDAR = 40;
CAL_APPLICATION_VCS = 41;
CAL_APPLICATION_ICS = 42;
CAL_APPLICATION_HBSVCS = 43;
}