Send and receive polls with latest protocol version

Co-authored-by: yash-signal <yash@signal.org>
This commit is contained in:
automated-signal
2025-11-12 09:06:06 -06:00
committed by GitHub
parent 8d1da41707
commit 6949190440
3 changed files with 6 additions and 3 deletions

View File

@@ -365,7 +365,8 @@ message DataMessage {
CDN_SELECTOR_ATTACHMENTS = 5; CDN_SELECTOR_ATTACHMENTS = 5;
MENTIONS = 6; MENTIONS = 6;
PAYMENTS = 7; PAYMENTS = 7;
CURRENT = 7; POLLS = 8;
CURRENT = 8;
} }
message GiftBadge { message GiftBadge {

View File

@@ -566,8 +566,9 @@ describe('backup/non-bubble messages', () => {
timestamp: 1, timestamp: 1,
readStatus: ReadStatus.Read, readStatus: ReadStatus.Read,
seenStatus: SeenStatus.Seen, seenStatus: SeenStatus.Seen,
supportedVersionAtReceive: 5, supportedVersionAtReceive:
requiredProtocolVersion: 6, Proto.DataMessage.ProtocolVersion.CURRENT - 2,
requiredProtocolVersion: Proto.DataMessage.ProtocolVersion.CURRENT - 1,
}, },
]); ]);
}); });

View File

@@ -679,6 +679,7 @@ class Message {
create.allowMultiple = Boolean(this.pollCreate.allowMultiple); create.allowMultiple = Boolean(this.pollCreate.allowMultiple);
create.options = this.pollCreate.options.slice(); create.options = this.pollCreate.options.slice();
proto.pollCreate = create; proto.pollCreate = create;
proto.requiredProtocolVersion = Proto.DataMessage.ProtocolVersion.POLLS;
} }
this.dataMessage = proto; this.dataMessage = proto;