Use protopiler for protocol buffers

Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
Fedor Indutny
2026-03-10 15:31:29 -07:00
committed by GitHub
parent b0e19f334e
commit c4ee32e9ee
97 changed files with 6197 additions and 6362 deletions

View File

@@ -104,17 +104,20 @@ message Envelope {
}
message Content {
optional DataMessage dataMessage = 1;
optional SyncMessage syncMessage = 2;
optional CallMessage callMessage = 3;
optional NullMessage nullMessage = 4;
optional ReceiptMessage receiptMessage = 5;
optional TypingMessage typingMessage = 6;
oneof content {
DataMessage dataMessage = 1;
SyncMessage syncMessage = 2;
CallMessage callMessage = 3;
NullMessage nullMessage = 4;
ReceiptMessage receiptMessage = 5;
TypingMessage typingMessage = 6;
bytes /* DecryptionErrorMessage */ decryptionErrorMessage = 8;
StoryMessage storyMessage = 9;
EditMessage editMessage = 11;
}
optional bytes /* SenderKeyDistributionMessage */ senderKeyDistributionMessage = 7;
optional bytes /* DecryptionErrorMessage */ decryptionErrorMessage = 8;
optional StoryMessage storyMessage = 9;
optional PniSignatureMessage pniSignatureMessage = 10;
optional EditMessage editMessage = 11;
}
message CallMessage {
@@ -237,6 +240,7 @@ message DataMessage {
enum Type {
NORMAL = 0;
GIFT_BADGE = 1;
POLL = 2;
}
message QuotedAttachment {
@@ -496,6 +500,12 @@ message TextAttachment {
}
message Gradient {
// Color ordering:
// 0 degrees: bottom-to-top
// 90 degrees: left-to-right
// 180 degrees: top-to-bottom
// 270 degrees: right-to-left
optional uint32 startColor = 1; // deprecated: this field will be removed in a future release.
optional uint32 endColor = 2; // deprecated: this field will be removed in a future release.
optional uint32 angle = 3; // degrees
@@ -608,7 +618,7 @@ message SyncMessage {
optional bool unidentifiedDeliveryIndicators = 2;
optional bool typingIndicators = 3;
reserved /* linkPreviews */ 4;
optional uint32 provisioningVersion = 5;
reserved /* provisioningVersion */ 5;
optional bool linkPreviews = 6;
}
@@ -723,8 +733,8 @@ message SyncMessage {
/* Data identifying a conversation. The service ID for 1:1, the group ID for
* group, or the room ID for an ad-hoc call. See also
* `CallLogEvent/peerId`. */
optional bytes peerId = 1;
* `CallLogEvent/conversationId`. */
optional bytes conversationId = 1;
/* An identifier for a call. Generated directly for 1:1, or derived from
* the era ID for group and ad-hoc calls. See also `CallLogEvent/callId`. */
optional uint64 callId = 2;
@@ -743,7 +753,7 @@ message SyncMessage {
optional bytes rootKey = 1;
optional bytes adminPasskey = 2;
optional Type type = 3; // defaults to UPDATE
reserved 4; // was epoch, never used
reserved /*epoch*/ 4;
}
message CallLogEvent {
@@ -758,8 +768,8 @@ message SyncMessage {
optional uint64 timestamp = 2;
/* Data identifying a conversation. The service ID for 1:1, the group ID for
* group, or the room ID for an ad-hoc call. See also
* `CallEvent/peerId`. */
optional bytes peerId = 3;
* `CallEvent/conversationId`. */
optional bytes conversationId = 3;
/* An identifier for a call. Generated directly for 1:1, or derived from
* the era ID for group and ad-hoc calls. See also `CallEvent/callId`. */
optional uint64 callId = 4;
@@ -840,31 +850,40 @@ message SyncMessage {
}
}
optional Sent sent = 1;
optional Contacts contacts = 2;
oneof content {
Sent sent = 1;
Contacts contacts = 2;
Request request = 4;
Blocked blocked = 6;
Verified verified = 7;
Configuration configuration = 9;
ViewOnceOpen viewOnceOpen = 11;
FetchLatest fetchLatest = 12;
Keys keys = 13;
MessageRequestResponse messageRequestResponse = 14;
OutgoingPayment outgoingPayment = 15;
PniChangeNumber pniChangeNumber = 18;
CallEvent callEvent = 19;
CallLinkUpdate callLinkUpdate = 20;
CallLogEvent callLogEvent = 21;
DeleteForMe deleteForMe = 22;
DeviceNameChange deviceNameChange = 23;
AttachmentBackfillRequest attachmentBackfillRequest = 24;
AttachmentBackfillResponse attachmentBackfillResponse = 25;
}
reserved /*groups*/ 3;
optional Request request = 4;
// Protobufs don't allow `repeated` fields to be inside of `oneof` so while
// the fields below are mutually exclusive with the rest of the values above
// we have to place them outside of `oneof`.
repeated Read read = 5;
optional Blocked blocked = 6;
optional Verified verified = 7;
optional Configuration configuration = 9;
optional bytes padding = 8;
repeated StickerPackOperation stickerPackOperation = 10;
optional ViewOnceOpen viewOnceOpen = 11;
optional FetchLatest fetchLatest = 12;
optional Keys keys = 13;
optional MessageRequestResponse messageRequestResponse = 14;
optional OutgoingPayment outgoingPayment = 15;
repeated Viewed viewed = 16;
reserved /*pniIdentity*/ 17;
optional PniChangeNumber pniChangeNumber = 18;
optional CallEvent callEvent = 19;
optional CallLinkUpdate callLinkUpdate = 20;
optional CallLogEvent callLogEvent = 21;
optional DeleteForMe deleteForMe = 22;
optional DeviceNameChange deviceNameChange = 23;
optional AttachmentBackfillRequest attachmentBackfillRequest = 24;
optional AttachmentBackfillResponse attachmentBackfillResponse = 25;
optional bytes padding = 8;
}
message AttachmentPointer {