964 lines
25 KiB
Protocol Buffer
964 lines
25 KiB
Protocol Buffer
//
|
|
// Copyright 2014 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
//
|
|
|
|
// iOS - since we use a modern proto-compiler, we must specify
|
|
// the legacy proto format.
|
|
syntax = "proto2";
|
|
|
|
// iOS - package name determines class prefix
|
|
package BackupProtos;
|
|
|
|
message BackupInfo {
|
|
// @required
|
|
optional uint64 version = 1;
|
|
// @required
|
|
optional uint64 backupTimeMs = 2;
|
|
}
|
|
|
|
message Frame {
|
|
// oneof item {
|
|
optional AccountData account = 1;
|
|
optional Recipient recipient = 2;
|
|
optional Chat chat = 3;
|
|
optional ChatItem chatItem = 4;
|
|
optional Call call = 5;
|
|
optional StickerPack stickerPack = 6;
|
|
// }
|
|
}
|
|
|
|
message AccountData {
|
|
enum PhoneNumberSharingMode {
|
|
UNKNOWN = 0;
|
|
EVERYBODY = 1;
|
|
NOBODY = 2;
|
|
}
|
|
message UsernameLink {
|
|
enum Color {
|
|
UNKNOWN = 0;
|
|
BLUE = 1;
|
|
WHITE = 2;
|
|
GREY = 3;
|
|
OLIVE = 4;
|
|
GREEN = 5;
|
|
ORANGE = 6;
|
|
PINK = 7;
|
|
PURPLE = 8;
|
|
}
|
|
|
|
// @required
|
|
optional bytes entropy = 1; // 32 bytes of entropy used for encryption
|
|
// @required
|
|
optional bytes serverId = 2; // 16 bytes of encoded UUID provided by the server
|
|
optional Color color = 3;
|
|
}
|
|
|
|
message AccountSettings {
|
|
// @required
|
|
optional bool readReceipts = 1;
|
|
// @required
|
|
optional bool sealedSenderIndicators = 2;
|
|
// @required
|
|
optional bool typingIndicators = 3;
|
|
// @required
|
|
optional bool noteToSelfMarkedUnread = 4;
|
|
// @required
|
|
optional bool linkPreviews = 5;
|
|
// @required
|
|
optional bool notDiscoverableByPhoneNumber = 6;
|
|
// @required
|
|
optional bool preferContactAvatars = 7;
|
|
// @required
|
|
optional uint32 universalExpireTimer = 8; // 0 means no universal expire timer.
|
|
repeated string preferredReactionEmoji = 9;
|
|
// @required
|
|
optional bool displayBadgesOnProfile = 10;
|
|
// @required
|
|
optional bool keepMutedChatsArchived = 11;
|
|
// @required
|
|
optional bool myStoriesPrivacyHasBeenSet = 12; // Removed 'has' prefix on spec definition to avoid name conflict.
|
|
// @required
|
|
optional bool onboardingStoryHasBeenViewed = 13; // Removed 'has' prefix on spec definition to avoid name conflict.
|
|
// @required
|
|
optional bool storiesDisabled = 14;
|
|
optional bool storyViewReceiptsEnabled = 15;
|
|
// @required
|
|
optional bool groupStoryEducationSheetHasBeenSeen = 16; // Removed 'has' prefix on spec definition to avoid name conflict.
|
|
// @required
|
|
optional bool usernameOnboardingHasBeenCompleted = 17; // Removed 'has' prefix on spec definition to avoid name conflict.
|
|
optional PhoneNumberSharingMode phoneNumberSharingMode = 18;
|
|
}
|
|
|
|
// @required
|
|
optional bytes profileKey = 1;
|
|
optional string username = 2;
|
|
// @required
|
|
optional UsernameLink usernameLink = 3;
|
|
// @required
|
|
optional string givenName = 4;
|
|
// @required
|
|
optional string familyName = 5;
|
|
// @required
|
|
optional string avatarPath = 6; // "Url" ommitted due to autocapitalization conflict in swift code.
|
|
// @required
|
|
optional bytes subscriberId = 7;
|
|
// @required
|
|
optional string subscriberCurrencyCode = 8;
|
|
// @required
|
|
optional bool subscriptionManuallyCancelled = 9;
|
|
// @required
|
|
optional AccountSettings accountSettings = 10;
|
|
}
|
|
|
|
message Recipient {
|
|
// @required
|
|
optional uint64 id = 1; // generated id for reference only within this file
|
|
// oneof destination {
|
|
optional Contact contact = 2;
|
|
optional Group group = 3;
|
|
optional DistributionList distributionList = 4;
|
|
optional SelfRecipient selfRecipient = 5;
|
|
optional ReleaseNotes releaseNotes = 6;
|
|
// }
|
|
}
|
|
|
|
message Contact {
|
|
enum Registered {
|
|
UNKNOWN = 0;
|
|
REGISTERED = 1;
|
|
NOT_REGISTERED = 2;
|
|
}
|
|
|
|
optional bytes aci = 1; // should be 16 bytes
|
|
optional bytes pni = 2; // should be 16 bytes
|
|
optional string username = 3;
|
|
optional uint64 e164 = 4;
|
|
// @required
|
|
optional bool blocked = 5;
|
|
// @required
|
|
optional bool hidden = 6;
|
|
optional Registered registered = 7;
|
|
// @required
|
|
optional uint64 unregisteredTimestamp = 8;
|
|
optional bytes profileKey = 9;
|
|
// @required
|
|
optional bool profileSharing = 10;
|
|
optional string profileGivenName = 11;
|
|
optional string profileFamilyName = 12;
|
|
// @required
|
|
optional bool hideStory = 13;
|
|
}
|
|
|
|
message Group {
|
|
enum StorySendMode {
|
|
DEFAULT = 0;
|
|
DISABLED = 1;
|
|
ENABLED = 2;
|
|
}
|
|
|
|
// @required
|
|
optional bytes masterKey = 1;
|
|
// @required
|
|
optional bool whitelisted = 2;
|
|
// @required
|
|
optional bool hideStory = 3;
|
|
optional StorySendMode storySendMode = 4;
|
|
}
|
|
|
|
message SelfRecipient {
|
|
}
|
|
|
|
message ReleaseNotes {
|
|
}
|
|
|
|
message Chat {
|
|
// @required
|
|
optional uint64 id = 1; // generated id for reference only within this file
|
|
// @required
|
|
optional uint64 recipientId = 2;
|
|
// @required
|
|
optional bool archived = 3;
|
|
// @required
|
|
optional uint32 pinnedOrder = 4; // 0 = unpinned, otherwise chat is considered pinned and will be displayed in ascending order
|
|
// @required
|
|
optional uint64 expirationTimerMs = 5; // 0 = no expire timer.
|
|
// @required
|
|
optional uint64 muteUntilMs = 6;
|
|
// @required
|
|
optional bool markedUnread = 7;
|
|
// @required
|
|
optional bool dontNotifyForMentionsIfMuted = 8;
|
|
optional FilePointer wallpaper = 9;
|
|
}
|
|
|
|
message DistributionList {
|
|
enum PrivacyMode {
|
|
UNKNOWN = 0;
|
|
ONLY_WITH = 1;
|
|
ALL_EXCEPT = 2;
|
|
ALL = 3;
|
|
}
|
|
|
|
// @required
|
|
optional string name = 1;
|
|
// @required
|
|
optional bytes distributionId = 2; // distribution list ids are uuids
|
|
// @required
|
|
optional bool allowReplies = 3;
|
|
// @required
|
|
optional uint64 deletionTimestamp = 4;
|
|
optional PrivacyMode privacyMode = 5;
|
|
repeated uint64 memberRecipientIds = 6; // generated recipient id
|
|
}
|
|
|
|
message Identity {
|
|
// @required
|
|
optional bytes serviceId = 1;
|
|
// @required
|
|
optional bytes identityKey = 2;
|
|
// @required
|
|
optional uint64 timestamp = 3;
|
|
// @required
|
|
optional bool firstUse = 4;
|
|
// @required
|
|
optional bool verified = 5;
|
|
// @required
|
|
optional bool nonblockingApproval = 6;
|
|
}
|
|
|
|
message Call {
|
|
enum Type {
|
|
UNKNOWN_TYPE = 0;
|
|
AUDIO_CALL = 1;
|
|
VIDEO_CALL = 2;
|
|
GROUP_CALL = 3;
|
|
AD_HOC_CALL = 4;
|
|
}
|
|
|
|
enum Event {
|
|
UNKNOWN_EVENT = 0;
|
|
OUTGOING = 1; // 1:1 calls only
|
|
ACCEPTED = 2; // 1:1 and group calls. Group calls: You accepted a ring.
|
|
NOT_ACCEPTED = 3; // 1:1 calls only,
|
|
MISSED = 4; // 1:1 and group. Group calls: The remote ring has expired or was cancelled by the ringer.
|
|
DELETE = 5; // 1:1 and Group/Ad-Hoc Calls.
|
|
GENERIC_GROUP_CALL = 6; // Group/Ad-Hoc Calls only. Initial state
|
|
JOINED = 7; // Group Calls: User has joined the group call.
|
|
DECLINED = 8; // Group Calls: If you declined a ring.
|
|
OUTGOING_RING = 9; // Group Calls: If you are ringing a group.
|
|
}
|
|
|
|
// @required
|
|
optional uint64 callId = 1;
|
|
// @required
|
|
optional uint64 conversationRecipientId = 2;
|
|
optional Type type = 3;
|
|
// @required
|
|
optional bool outgoing = 4;
|
|
// @required
|
|
optional uint64 timestamp = 5;
|
|
optional uint64 ringerRecipientId = 6;
|
|
optional Event event = 7;
|
|
}
|
|
|
|
message ChatItem {
|
|
message IncomingMessageDetails {
|
|
// @required
|
|
optional uint64 dateReceived = 1;
|
|
// @required
|
|
optional uint64 dateServerSent = 2;
|
|
// @required
|
|
optional bool read = 3;
|
|
}
|
|
|
|
message OutgoingMessageDetails {
|
|
repeated SendStatus sendStatus = 1;
|
|
}
|
|
|
|
message DirectionlessMessageDetails {
|
|
}
|
|
|
|
// @required
|
|
optional uint64 chatId = 1; // conversation id
|
|
// @required
|
|
optional uint64 authorId = 2; // recipient id
|
|
// @required
|
|
optional uint64 dateSent = 3;
|
|
// @required
|
|
optional bool sealedSender = 4;
|
|
optional uint64 expireStartDate = 5; // timestamp of when expiration timer started ticking down
|
|
optional uint64 expiresInMs = 6; // how long timer of message is (ms)
|
|
repeated ChatItem revisions = 7; // ordered from oldest to newest
|
|
// @required
|
|
optional bool sms = 8;
|
|
|
|
// oneof directionalDetails {
|
|
optional IncomingMessageDetails incoming = 9;
|
|
optional OutgoingMessageDetails outgoing = 10;
|
|
optional DirectionlessMessageDetails directionless = 11;
|
|
// }
|
|
|
|
// oneof item {
|
|
optional StandardMessage standardMessage = 13;
|
|
optional ContactMessage contactMessage = 14;
|
|
optional VoiceMessage voiceMessage = 15;
|
|
optional StickerMessage stickerMessage = 16;
|
|
optional RemoteDeletedMessage remoteDeletedMessage = 17;
|
|
optional ChatUpdateMessage updateMessage = 18;
|
|
// }
|
|
}
|
|
|
|
message SendStatus {
|
|
enum Status {
|
|
UNKNOWN = 0;
|
|
FAILED = 1;
|
|
PENDING = 2;
|
|
SENT = 3;
|
|
DELIVERED = 4;
|
|
READ = 5;
|
|
VIEWED = 6;
|
|
SKIPPED = 7; // e.g. user in group was blocked, so we skipped sending to them
|
|
}
|
|
// @required
|
|
optional uint64 recipientId = 1;
|
|
optional Status deliveryStatus = 2;
|
|
// @required
|
|
optional bool networkFailure = 3;
|
|
// @required
|
|
optional bool identityKeyMismatch = 4;
|
|
// @required
|
|
optional bool sealedSender = 5;
|
|
// @required
|
|
optional uint64 lastStatusUpdateTimestamp = 6; // the time the status was last updated -- if from a receipt, it should be the sentTime of the receipt
|
|
}
|
|
|
|
message Text {
|
|
// @required
|
|
optional string body = 1;
|
|
repeated BodyRange bodyRanges = 2;
|
|
}
|
|
|
|
message StandardMessage {
|
|
optional Quote quote = 1;
|
|
optional Text text = 2;
|
|
repeated FilePointer attachments = 3;
|
|
repeated LinkPreview linkPreview = 4;
|
|
optional FilePointer longText = 5;
|
|
repeated Reaction reactions = 6;
|
|
}
|
|
|
|
message ContactMessage {
|
|
repeated ContactAttachment contact = 1;
|
|
repeated Reaction reactions = 2;
|
|
}
|
|
|
|
message ContactAttachment {
|
|
message Name {
|
|
optional string givenName = 1;
|
|
optional string familyName = 2;
|
|
optional string prefix = 3;
|
|
optional string suffix = 4;
|
|
optional string middleName = 5;
|
|
optional string displayName = 6;
|
|
}
|
|
|
|
message Phone {
|
|
enum Type {
|
|
UNKNOWN = 0;
|
|
HOME = 1;
|
|
MOBILE = 2;
|
|
WORK = 3;
|
|
CUSTOM = 4;
|
|
}
|
|
|
|
optional string value = 1;
|
|
optional Type type = 2;
|
|
optional string label = 3;
|
|
}
|
|
|
|
message Email {
|
|
enum Type {
|
|
UNKNOWN = 0;
|
|
HOME = 1;
|
|
MOBILE = 2;
|
|
WORK = 3;
|
|
CUSTOM = 4;
|
|
}
|
|
|
|
optional string value = 1;
|
|
optional Type type = 2;
|
|
optional string label = 3;
|
|
}
|
|
|
|
message PostalAddress {
|
|
enum Type {
|
|
UNKNOWN = 0;
|
|
HOME = 1;
|
|
WORK = 2;
|
|
CUSTOM = 3;
|
|
}
|
|
|
|
optional Type type = 1;
|
|
optional string label = 2;
|
|
optional string street = 3;
|
|
optional string pobox = 4;
|
|
optional string neighborhood = 5;
|
|
optional string city = 6;
|
|
optional string region = 7;
|
|
optional string postcode = 8;
|
|
optional string country = 9;
|
|
}
|
|
|
|
message Avatar {
|
|
// @required
|
|
optional FilePointer avatar = 1;
|
|
}
|
|
|
|
optional Name name = 1;
|
|
repeated Phone number = 3;
|
|
repeated Email email = 4;
|
|
repeated PostalAddress address = 5;
|
|
optional Avatar avatar = 6;
|
|
optional string organization = 7;
|
|
}
|
|
|
|
message DocumentMessage {
|
|
// @required
|
|
optional Text text = 1;
|
|
// @required
|
|
optional FilePointer document = 2;
|
|
repeated Reaction reactions = 3;
|
|
}
|
|
|
|
message VoiceMessage {
|
|
optional Quote quote = 1;
|
|
// @required
|
|
optional FilePointer audio = 2;
|
|
repeated Reaction reactions = 3;
|
|
}
|
|
|
|
message StickerMessage {
|
|
// @required
|
|
optional Sticker sticker = 1;
|
|
repeated Reaction reactions = 2;
|
|
}
|
|
|
|
// Tombstone for remote delete
|
|
message RemoteDeletedMessage {
|
|
}
|
|
|
|
message Sticker {
|
|
// @required
|
|
optional bytes packId = 1;
|
|
// @required
|
|
optional bytes packKey = 2;
|
|
// @required
|
|
optional uint32 stickerId = 3;
|
|
optional string emoji = 4;
|
|
}
|
|
|
|
message LinkPreview {
|
|
// @required
|
|
optional string url = 1;
|
|
optional string title = 2;
|
|
optional FilePointer image = 3;
|
|
optional string descriptionText = 4; // 'description' collides with NSObject.description
|
|
optional uint64 date = 5;
|
|
}
|
|
|
|
message FilePointer {
|
|
message BackupLocator {
|
|
// @required
|
|
optional string mediaName = 1;
|
|
// @required
|
|
optional uint32 cdnNumber = 2;
|
|
}
|
|
|
|
message AttachmentLocator {
|
|
// @required
|
|
optional string cdnKey = 1;
|
|
// @required
|
|
optional uint32 cdnNumber = 2;
|
|
// @required
|
|
optional uint64 uploadTimestamp = 3;
|
|
}
|
|
|
|
message LegacyAttachmentLocator {
|
|
// @required
|
|
optional fixed64 cdnId = 1;
|
|
}
|
|
|
|
// An attachment that was backed up without being downloaded.
|
|
// Its MediaName should be generated as “{sender_aci}_{cdn_attachment_key}”,
|
|
// but should eventually transition to a BackupLocator with mediaName
|
|
// being the content hash once it is downloaded.
|
|
message UndownloadedBackupLocator {
|
|
// @required
|
|
optional bytes senderAci = 1;
|
|
// @required
|
|
optional string cdnKey = 2;
|
|
// @required
|
|
optional uint32 cdnNumber = 3;
|
|
}
|
|
|
|
enum Flags {
|
|
VOICE_MESSAGE = 0;
|
|
BORDERLESS = 1;
|
|
GIF = 2;
|
|
}
|
|
|
|
// oneof locator {
|
|
optional BackupLocator backupLocator = 1;
|
|
optional AttachmentLocator attachmentLocator= 2;
|
|
optional LegacyAttachmentLocator legacyAttachmentLocator = 3;
|
|
optional UndownloadedBackupLocator undownloadedBackupLocator = 4;
|
|
// }
|
|
|
|
optional bytes key = 5;
|
|
optional string contentType = 6;
|
|
// Size of fullsize decrypted media blob in bytes.
|
|
// Can be ignored if unset/unavailable.
|
|
optional uint32 size = 7;
|
|
optional bytes incrementalMac = 8;
|
|
optional bytes incrementalMacChunkSize = 9;
|
|
optional string fileName = 10;
|
|
optional uint32 flags = 11;
|
|
optional uint32 width = 12;
|
|
optional uint32 height = 13;
|
|
optional string caption = 14;
|
|
optional string blurHash = 15;
|
|
}
|
|
|
|
message Quote {
|
|
enum Type {
|
|
UNKNOWN = 0;
|
|
NORMAL = 1;
|
|
GIFTBADGE = 2;
|
|
}
|
|
|
|
message QuotedAttachment {
|
|
optional string contentType = 1;
|
|
optional string fileName = 2;
|
|
optional FilePointer thumbnail = 3;
|
|
}
|
|
|
|
optional uint64 targetSentTimestamp = 1; // null if the target message could not be found at time of quote insert
|
|
// @required
|
|
optional uint64 authorId = 2;
|
|
optional string text = 3;
|
|
repeated QuotedAttachment attachments = 4;
|
|
repeated BodyRange bodyRanges = 5;
|
|
optional Type type = 6;
|
|
}
|
|
|
|
message BodyRange {
|
|
enum Style {
|
|
NONE = 0;
|
|
BOLD = 1;
|
|
ITALIC = 2;
|
|
SPOILER = 3;
|
|
STRIKETHROUGH = 4;
|
|
MONOSPACE = 5;
|
|
}
|
|
|
|
optional uint32 start = 1;
|
|
optional uint32 length = 2;
|
|
|
|
// oneof associatedValue {
|
|
optional bytes mentionAci = 3;
|
|
optional Style style = 4;
|
|
// }
|
|
}
|
|
|
|
message Reaction {
|
|
// @required
|
|
optional string emoji = 1;
|
|
// @required
|
|
optional uint64 authorId = 2;
|
|
// @required
|
|
optional uint64 sentTimestamp = 3;
|
|
optional uint64 receivedTimestamp = 4;
|
|
// @required
|
|
optional uint64 sortOrder = 5; // A higher sort order means that a reaction is more recent
|
|
}
|
|
|
|
message ChatUpdateMessage {
|
|
// oneof update {
|
|
optional SimpleChatUpdate simpleUpdate = 1;
|
|
optional GroupChangeChatUpdate groupChange = 2;
|
|
optional ExpirationTimerChatUpdate expirationTimerChange = 3;
|
|
optional ProfileChangeChatUpdate profileChange = 4;
|
|
optional ThreadMergeChatUpdate threadMerge = 5;
|
|
optional SessionSwitchoverChatUpdate sessionSwitchover = 6;
|
|
optional CallChatUpdate callingMessage = 7;
|
|
// }
|
|
}
|
|
|
|
message CallChatUpdate {
|
|
// oneof call {
|
|
optional uint64 callId = 1; // maps to id of Call from call log
|
|
optional IndividualCallChatUpdate callMessage = 2;
|
|
optional GroupCallChatUpdate groupCall = 3;
|
|
// }
|
|
}
|
|
|
|
message IndividualCallChatUpdate {
|
|
enum Type {
|
|
UNKNOWN = 0;
|
|
INCOMING_AUDIO_CALL = 1;
|
|
INCOMING_VIDEO_CALL = 2;
|
|
OUTGOING_AUDIO_CALL = 3;
|
|
OUTGOING_VIDEO_CALL = 4;
|
|
MISSED_AUDIO_CALL = 5;
|
|
MISSED_VIDEO_CALL = 6;
|
|
}
|
|
}
|
|
|
|
message GroupCallChatUpdate {
|
|
optional bytes startedCallAci = 1;
|
|
// @required
|
|
optional uint64 startedCallTimestamp = 2;
|
|
repeated bytes inCallAcis = 3;
|
|
}
|
|
|
|
message SimpleChatUpdate {
|
|
enum Type {
|
|
UNKNOWN = 0;
|
|
JOINED_SIGNAL = 1;
|
|
IDENTITY_UPDATE = 2;
|
|
IDENTITY_VERIFIED = 3;
|
|
IDENTITY_DEFAULT = 4; // marking as unverified
|
|
CHANGE_NUMBER = 5;
|
|
BOOST_REQUEST = 6;
|
|
END_SESSION = 7;
|
|
CHAT_SESSION_REFRESH = 8;
|
|
BAD_DECRYPT = 9;
|
|
PAYMENTS_ACTIVATED = 10;
|
|
PAYMENT_ACTIVATION_REQUEST = 11;
|
|
}
|
|
|
|
optional Type type = 1;
|
|
}
|
|
|
|
message GroupDescriptionChatUpdate {
|
|
// @required
|
|
optional string newDescription = 1;
|
|
}
|
|
|
|
// For 1:1 chat updates only.
|
|
// For group thread updates use GroupExpirationTimerUpdate.
|
|
message ExpirationTimerChatUpdate {
|
|
// @required
|
|
optional uint32 expiresInMs = 1; // 0 means the expiration timer was disabled
|
|
}
|
|
|
|
message ProfileChangeChatUpdate {
|
|
// @required
|
|
optional string previousName = 1;
|
|
// @required
|
|
optional string newName = 2;
|
|
}
|
|
|
|
message ThreadMergeChatUpdate {
|
|
// @required
|
|
optional uint64 previousE164 = 1;
|
|
}
|
|
|
|
message SessionSwitchoverChatUpdate {
|
|
// @required
|
|
optional uint64 e164 = 1;
|
|
}
|
|
|
|
message GroupChangeChatUpdate {
|
|
message Update {
|
|
// Note: group expiration timer changes are represented as ExpirationTimerChatUpdate.
|
|
// oneof update {
|
|
optional GenericGroupUpdate genericGroupUpdate = 1;
|
|
optional GroupCreationUpdate groupCreationUpdate = 2;
|
|
optional GroupNameUpdate groupNameUpdate = 3;
|
|
optional GroupAvatarUpdate groupAvatarUpdate = 4;
|
|
optional GroupDescriptionUpdate groupDescriptionUpdate = 5;
|
|
optional GroupMembershipAccessLevelChangeUpdate groupMembershipAccessLevelChangeUpdate = 6;
|
|
optional GroupAttributesAccessLevelChangeUpdate groupAttributesAccessLevelChangeUpdate = 7;
|
|
optional GroupAnnouncementOnlyChangeUpdate groupAnnouncementOnlyChangeUpdate = 8;
|
|
optional GroupAdminStatusUpdate groupAdminStatusUpdate = 9;
|
|
optional GroupMemberLeftUpdate groupMemberLeftUpdate = 10;
|
|
optional GroupMemberRemovedUpdate groupMemberRemovedUpdate = 11;
|
|
optional SelfInvitedToGroupUpdate selfInvitedToGroupUpdate = 12;
|
|
optional SelfInvitedOtherUserToGroupUpdate selfInvitedOtherUserToGroupUpdate = 13;
|
|
optional GroupUnknownInviteeUpdate groupUnknownInviteeUpdate = 14;
|
|
optional GroupInvitationAcceptedUpdate groupInvitationAcceptedUpdate = 15;
|
|
optional GroupInvitationDeclinedUpdate groupInvitationDeclinedUpdate = 16;
|
|
optional GroupMemberJoinedUpdate groupMemberJoinedUpdate = 17;
|
|
optional GroupMemberAddedUpdate groupMemberAddedUpdate = 18;
|
|
optional GroupSelfInvitationRevokedUpdate groupSelfInvitationRevokedUpdate = 19;
|
|
optional GroupInvitationRevokedUpdate groupInvitationRevokedUpdate = 20;
|
|
optional GroupJoinRequestUpdate groupJoinRequestUpdate = 21;
|
|
optional GroupJoinRequestApprovalUpdate groupJoinRequestApprovalUpdate = 22;
|
|
optional GroupJoinRequestCanceledUpdate groupJoinRequestCanceledUpdate = 23;
|
|
optional GroupInviteLinkResetUpdate groupInviteLinkResetUpdate = 24;
|
|
optional GroupInviteLinkEnabledUpdate groupInviteLinkEnabledUpdate = 25;
|
|
optional GroupInviteLinkAdminApprovalUpdate groupInviteLinkAdminApprovalUpdate = 26;
|
|
optional GroupInviteLinkDisabledUpdate groupInviteLinkDisabledUpdate = 27;
|
|
optional GroupMemberJoinedByLinkUpdate groupMemberJoinedByLinkUpdate = 28;
|
|
optional GroupV2MigrationUpdate groupV2MigrationUpdate = 29;
|
|
optional GroupV2MigrationSelfInvitedUpdate groupV2MigrationSelfInvitedUpdate = 30;
|
|
optional GroupV2MigrationInvitedMembersUpdate groupV2MigrationInvitedMembersUpdate = 31;
|
|
optional GroupV2MigrationDroppedMembersUpdate groupV2MigrationDroppedMembersUpdate = 32;
|
|
optional GroupSequenceOfRequestsAndCancelsUpdate groupSequenceOfRequestsAndCancelsUpdate = 33;
|
|
optional GroupExpirationTimerUpdate groupExpirationTimerUpdate = 34;
|
|
// }
|
|
}
|
|
|
|
// Must be one or more; all updates batched together came from
|
|
// a single batched group state update.
|
|
repeated Update updates = 1;
|
|
}
|
|
|
|
message GenericGroupUpdate {
|
|
optional bytes updaterAci = 1;
|
|
}
|
|
|
|
message GroupCreationUpdate {
|
|
optional bytes updaterAci = 1;
|
|
}
|
|
|
|
message GroupNameUpdate {
|
|
optional bytes updaterAci = 1;
|
|
// Null value means the group name was removed.
|
|
optional string newGroupName = 2;
|
|
}
|
|
|
|
message GroupAvatarUpdate {
|
|
optional bytes updaterAci = 1;
|
|
// @required
|
|
optional bool wasRemoved = 2;
|
|
}
|
|
|
|
message GroupDescriptionUpdate {
|
|
optional bytes updaterAci = 1;
|
|
// Null value means the group description was removed.
|
|
optional string newDescription = 2;
|
|
}
|
|
|
|
enum GroupV2AccessLevel {
|
|
UNKNOWN = 0;
|
|
ANY = 1;
|
|
MEMBER = 2;
|
|
ADMINISTRATOR = 3;
|
|
UNSATISFIABLE = 4;
|
|
}
|
|
|
|
message GroupMembershipAccessLevelChangeUpdate {
|
|
optional bytes updaterAci = 1;
|
|
optional GroupV2AccessLevel accessLevel = 2;
|
|
}
|
|
|
|
message GroupAttributesAccessLevelChangeUpdate {
|
|
optional bytes updaterAci = 1;
|
|
optional GroupV2AccessLevel accessLevel = 2;
|
|
}
|
|
|
|
message GroupAnnouncementOnlyChangeUpdate {
|
|
optional bytes updaterAci = 1;
|
|
// @required
|
|
optional bool isAnnouncementOnly = 2;
|
|
}
|
|
|
|
message GroupAdminStatusUpdate {
|
|
optional bytes updaterAci = 1;
|
|
// The aci who had admin status granted or revoked.
|
|
// @required
|
|
optional bytes memberAci = 2;
|
|
// @required
|
|
optional bool wasAdminStatusGranted = 3;
|
|
}
|
|
|
|
message GroupMemberLeftUpdate {
|
|
// @required
|
|
optional bytes aci = 1;
|
|
}
|
|
|
|
message GroupMemberRemovedUpdate {
|
|
optional bytes removerAci = 1;
|
|
// @required
|
|
optional bytes removedAci = 2;
|
|
}
|
|
|
|
message SelfInvitedToGroupUpdate {
|
|
optional bytes inviterAci = 1;
|
|
}
|
|
|
|
message SelfInvitedOtherUserToGroupUpdate {
|
|
// If no invitee id available, use GroupUnknownInviteeUpdate
|
|
// @required
|
|
optional bytes inviteeServiceId = 1;
|
|
}
|
|
|
|
message GroupUnknownInviteeUpdate {
|
|
// Can be the self user.
|
|
optional bytes inviterAci = 1;
|
|
// @required
|
|
optional uint32 inviteeCount = 2;
|
|
}
|
|
|
|
message GroupInvitationAcceptedUpdate {
|
|
optional bytes inviterAci = 1;
|
|
// @required
|
|
optional bytes newMemberAci = 2;
|
|
}
|
|
|
|
message GroupInvitationDeclinedUpdate {
|
|
optional bytes inviterAci = 1;
|
|
// Note: if invited by pni, just set inviteeAci to nil.
|
|
optional bytes inviteeAci = 2;
|
|
}
|
|
|
|
message GroupMemberJoinedUpdate {
|
|
// @required
|
|
optional bytes newMemberAci = 1;
|
|
}
|
|
|
|
message GroupMemberAddedUpdate {
|
|
optional bytes updaterAci = 1;
|
|
// @required
|
|
optional bytes newMemberAci = 2;
|
|
// @required
|
|
optional bool hadOpenInvitation = 3;
|
|
// If hadOpenInvitation is true, optionally include aci of the inviter.
|
|
optional bytes inviterAci = 4;
|
|
}
|
|
|
|
// An invitation to self was revoked.
|
|
message GroupSelfInvitationRevokedUpdate {
|
|
optional bytes revokerAci = 1;
|
|
}
|
|
|
|
// These invitees should never be the local user.
|
|
// Use GroupSelfInvitationRevokedUpdate in those cases.
|
|
// The inviter or updater can be the local user.
|
|
message GroupInvitationRevokedUpdate {
|
|
message Invitee {
|
|
optional bytes inviterAci = 1;
|
|
// Prefer to use aci over pni. No need to set
|
|
// pni if aci is set. Both can be missing.
|
|
optional bytes inviteeAci = 2;
|
|
optional bytes inviteePni = 3;
|
|
}
|
|
|
|
// The member that revoked the invite(s), not the inviter!
|
|
// Assumed to be an admin (at the time, may no longer be an
|
|
// admin or even a member).
|
|
optional bytes updaterAci = 1;
|
|
repeated Invitee invitees = 2;
|
|
}
|
|
|
|
message GroupJoinRequestUpdate {
|
|
// @required
|
|
optional bytes requestorAci = 1;
|
|
}
|
|
|
|
message GroupJoinRequestApprovalUpdate {
|
|
// @required
|
|
optional bytes requestorAci = 1;
|
|
// The aci that approved or rejected the request.
|
|
optional bytes updaterAci = 2;
|
|
// @required
|
|
optional bool wasApproved = 3;
|
|
}
|
|
|
|
message GroupJoinRequestCanceledUpdate {
|
|
// @required
|
|
optional bytes requestorAci = 1;
|
|
}
|
|
|
|
// A single requestor has requested to join and cancelled
|
|
// their request repeatedly with no other updates in between.
|
|
// The last action encompassed by this update is always a
|
|
// cancellation; if there was another open request immediately
|
|
// after, it will be a separate GroupJoinRequestUpdate, either
|
|
// in the same frame or in a subsequent frame.
|
|
message GroupSequenceOfRequestsAndCancelsUpdate {
|
|
// @required
|
|
optional bytes requestorAci = 1;
|
|
// @required
|
|
optional uint32 count = 2;
|
|
}
|
|
|
|
message GroupInviteLinkResetUpdate {
|
|
optional bytes updaterAci = 1;
|
|
}
|
|
|
|
message GroupInviteLinkEnabledUpdate {
|
|
optional bytes updaterAci = 1;
|
|
// @required
|
|
optional bool linkRequiresAdminApproval = 2;
|
|
}
|
|
|
|
message GroupInviteLinkAdminApprovalUpdate {
|
|
optional bytes updaterAci = 1;
|
|
// @required
|
|
optional bool linkRequiresAdminApproval = 2;
|
|
}
|
|
|
|
message GroupInviteLinkDisabledUpdate {
|
|
optional bytes updaterAci = 1;
|
|
}
|
|
|
|
message GroupMemberJoinedByLinkUpdate {
|
|
// @required
|
|
optional bytes newMemberAci = 1;
|
|
}
|
|
|
|
// A gv1->gv2 migration occurred.
|
|
message GroupV2MigrationUpdate {
|
|
}
|
|
|
|
// Another user migrated gv1->gv2 but was unable to add
|
|
// the local user and invited them instead.
|
|
message GroupV2MigrationSelfInvitedUpdate {
|
|
}
|
|
|
|
// The local user migrated gv1->gv2 but was unable to
|
|
// add some members and invited them instead.
|
|
// (Happens if we don't have the invitee's profile key)
|
|
message GroupV2MigrationInvitedMembersUpdate {
|
|
// @required
|
|
optional uint32 invitedMembersCount = 1;
|
|
}
|
|
|
|
// The local user migrated gv1->gv2 but was unable to
|
|
// add or invite some members and dropped them instead.
|
|
// (Happens for e164 members where we don't have an aci).
|
|
message GroupV2MigrationDroppedMembersUpdate {
|
|
// @required
|
|
optional uint32 droppedMembersCount = 1;
|
|
}
|
|
|
|
// For 1:1 timer updates, use ExpirationTimerChatUpdate.
|
|
message GroupExpirationTimerUpdate {
|
|
// @required
|
|
optional uint32 expiresInMs = 1; // 0 means the expiration timer was disabled.
|
|
optional bytes updaterAci = 2;
|
|
}
|
|
|
|
message StickerPack {
|
|
// @required
|
|
optional bytes id = 1;
|
|
// @required
|
|
optional bytes key = 2;
|
|
// @required
|
|
optional string title = 3;
|
|
// @required
|
|
optional string author = 4;
|
|
repeated StickerPackSticker stickers = 5; // First one should be cover sticker.
|
|
}
|
|
|
|
message StickerPackSticker {
|
|
// @required
|
|
optional FilePointer data = 1;
|
|
// @required
|
|
optional string emoji = 2;
|
|
}
|