342 lines
8.6 KiB
Protocol Buffer
342 lines
8.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
package conversations;
|
|
|
|
option go_package = "../gmproto";
|
|
|
|
message Contact {
|
|
string ID = 1;
|
|
string name = 2;
|
|
ContactNumber number = 3;
|
|
string avatarHexColor = 7;
|
|
bool unknownBool = 10;
|
|
string avatarID = 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;
|
|
}
|
|
|
|
message Message {
|
|
string messageID = 1;
|
|
MsgType msgType = 3;
|
|
MessageStatus messageStatus = 4;
|
|
int64 timestamp = 5; // check this
|
|
string conversationID = 7;
|
|
string participantID = 9;
|
|
repeated MessageInfo messageInfo = 10;
|
|
int64 type = 11;
|
|
string tmpID = 12;
|
|
optional string subject = 14;
|
|
int64 someInt = 16;
|
|
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
|
|
ReplyMessageData replyMessageData = 3;
|
|
}
|
|
|
|
message ReplyMessageData {
|
|
|
|
}
|
|
|
|
message MessageInfo {
|
|
optional string actionMessageID = 1;
|
|
oneof data {
|
|
MessageContent messageContent = 2;
|
|
MediaContent mediaContent = 3;
|
|
}
|
|
}
|
|
|
|
message MediaContent {
|
|
MediaFormats format = 1;
|
|
string mediaID = 2;
|
|
string mediaName = 4;
|
|
int64 size = 5;
|
|
Dimensions dimensions = 6;
|
|
bytes mediaData = 7;
|
|
string mediaID2 = 9;
|
|
bytes decryptionKey = 11;
|
|
bytes decryptionKey2 = 12;
|
|
}
|
|
|
|
message Dimensions {
|
|
int64 width = 1;
|
|
int64 height = 2;
|
|
}
|
|
|
|
message MessageContent {
|
|
string content = 1;
|
|
}
|
|
|
|
message MsgType {
|
|
int64 type = 1;
|
|
}
|
|
|
|
message MessageStatus {
|
|
MessageStatusType status = 2;
|
|
int64 subCode = 3;
|
|
string errMsg = 4;
|
|
string statusText = 5;
|
|
int64 thirdCode = 6;
|
|
}
|
|
|
|
message Conversation {
|
|
string conversationID = 1;
|
|
string name = 2;
|
|
LatestMessage latestMessage = 4;
|
|
int64 lastMessageTimestamp = 5;
|
|
bool unread = 6;
|
|
|
|
bool isGroupChat = 10; // not certain
|
|
string defaultOutgoingID = 11;
|
|
|
|
//bool bool1 = 13;
|
|
ConvUpdateTypes status = 12;
|
|
string avatarHexColor = 15;
|
|
string latestMessageID = 17;
|
|
repeated Participant participants = 20;
|
|
repeated string otherParticipants = 21; // participant ids excluding me
|
|
ConversationType type = 22;
|
|
bool subType = 24;
|
|
int64 unknownTimestamp = 28; // set to lastMessageTimestamp + 1000 when marking as unread?
|
|
bool thirdType = 29;
|
|
}
|
|
|
|
message Participant {
|
|
SmallInfo ID = 1;
|
|
string firstName = 2;
|
|
string fullName = 3;
|
|
string avatarHexColor = 5;
|
|
bool isMe = 6;
|
|
Muted muted = 7;
|
|
int64 someInt = 8;
|
|
string avatarID = 10;
|
|
int64 bs = 14;
|
|
string formattedNumber = 15;
|
|
int64 someInt1 = 19;
|
|
int64 someInt2 = 20;
|
|
}
|
|
|
|
enum IdentifierType {
|
|
UNKNOWN = 0;
|
|
PHONE = 1;
|
|
EMAIL = 2;
|
|
}
|
|
|
|
message SmallInfo {
|
|
IdentifierType type = 1;
|
|
string number = 2;
|
|
string participantID = 3;
|
|
}
|
|
|
|
message LatestMessage {
|
|
string displayContent = 1;
|
|
int64 fromMe = 2;
|
|
|
|
string displayName = 4;
|
|
LatestMessageStatus latestMessageStatus = 5;
|
|
}
|
|
|
|
message LatestMessageStatus {
|
|
int64 status2 = 1;
|
|
MessageStatusType status = 2;
|
|
}
|
|
|
|
message Muted {
|
|
int64 isMuted = 1;
|
|
}
|
|
|
|
enum ConversationType {
|
|
UNKNOWN_CONVERSATION_TYPE = 0;
|
|
SMS = 1;
|
|
RCS = 2;
|
|
}
|
|
|
|
enum MessageStatusType {
|
|
STATUS_UNKNOWN = 0;
|
|
|
|
OUTGOING_COMPLETE = 1;
|
|
OUTGOING_DELIVERED = 2;
|
|
OUTGOING_DISPLAYED = 11;
|
|
OUTGOING_DRAFT = 3;
|
|
OUTGOING_SEND_AFTER_PROCESSING = 10;
|
|
OUTGOING_YET_TO_SEND = 4;
|
|
OUTGOING_SENDING = 5;
|
|
OUTGOING_RESENDING = 6;
|
|
OUTGOING_AWAITING_RETRY = 7;
|
|
OUTGOING_FAILED_GENERIC = 8;
|
|
OUTGOING_FAILED_EMERGENCY_NUMBER = 9;
|
|
OUTGOING_CANCELED = 12;
|
|
OUTGOING_FAILED_TOO_LARGE = 13;
|
|
OUTGOING_NOT_DELIVERED_YET = 14;
|
|
OUTGOING_REVOCATION_PENDING = 15;
|
|
OUTGOING_SCHEDULED = 16;
|
|
OUTGOING_FAILED_RECIPIENT_LOST_RCS = 17;
|
|
OUTGOING_FAILED_NO_RETRY_NO_FALLBACK = 18;
|
|
OUTGOING_FAILED_RECIPIENT_DID_NOT_DECRYPT = 19;
|
|
OUTGOING_VALIDATING = 20;
|
|
OUTGOING_FAILED_RECIPIENT_LOST_ENCRYPTION = 21;
|
|
OUTGOING_FAILED_RECIPIENT_DID_NOT_DECRYPT_NO_MORE_RETRY = 22;
|
|
|
|
INCOMING_COMPLETE = 100;
|
|
INCOMING_YET_TO_MANUAL_DOWNLOAD = 101;
|
|
INCOMING_RETRYING_MANUAL_DOWNLOAD = 102;
|
|
INCOMING_MANUAL_DOWNLOADING = 103;
|
|
INCOMING_RETRYING_AUTO_DOWNLOAD = 104;
|
|
INCOMING_AUTO_DOWNLOADING = 105;
|
|
INCOMING_DOWNLOAD_FAILED = 106;
|
|
INCOMING_EXPIRED_OR_NOT_AVAILABLE = 107;
|
|
INCOMING_DELIVERED = 108;
|
|
INCOMING_DISPLAYED = 109;
|
|
INCOMING_DOWNLOAD_CANCELED = 110;
|
|
INCOMING_DOWNLOAD_FAILED_TOO_LARGE = 111;
|
|
INCOMING_DOWNLOAD_FAILED_SIM_HAS_NO_DATA = 112;
|
|
INCOMING_FAILED_TO_DECRYPT = 113;
|
|
INCOMING_DECRYPTION_ABORTED = 114;
|
|
|
|
TOMBSTONE_PARTICIPANT_JOINED = 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;
|
|
|
|
MESSAGE_DELETED = 300;
|
|
}
|
|
|
|
enum ConvUpdateTypes {
|
|
UNKNOWN_CONVTYPE = 0;
|
|
UNARCHIVED = 1;
|
|
ARCHIVED = 2;
|
|
DELETED = 3;
|
|
BLOCKED_AND_REPORTED = 5;
|
|
BLOCKED = 6;
|
|
}
|
|
|
|
enum MediaFormats {
|
|
UNSPECIFIED_TYPE = 0;
|
|
IMAGE_JPEG = 1;
|
|
IMAGE_JPG = 2;
|
|
IMAGE_PNG = 3;
|
|
IMAGE_GIF = 4;
|
|
IMAGE_WBMP = 5;
|
|
IMAGE_X_MS_BMP = 6;
|
|
IMAGE_UNSPECIFIED = 7;
|
|
|
|
VIDEO_MP4 = 8;
|
|
VIDEO_3G2 = 9;
|
|
VIDEO_3GPP = 10;
|
|
VIDEO_WEBM = 11;
|
|
VIDEO_MKV = 12;
|
|
VIDEO_UNSPECIFIED = 13;
|
|
|
|
AUDIO_AAC = 14;
|
|
AUDIO_AMR = 15;
|
|
AUDIO_MP3 = 16;
|
|
AUDIO_MPEG = 17;
|
|
AUDIO_MPG = 18;
|
|
AUDIO_MP4 = 19;
|
|
AUDIO_MP4_LATM = 20;
|
|
AUDIO_3GPP = 21;
|
|
AUDIO_OGG = 22;
|
|
AUDIO_UNSPECIFIED = 23;
|
|
|
|
TEXT_VCARD = 24;
|
|
|
|
APP_PDF = 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;
|
|
}
|