Send and receive polls with latest protocol version

This commit is contained in:
yash-signal
2025-11-11 16:08:37 -06:00
committed by GitHub
parent 44d412bc06
commit 677404e82d
3 changed files with 6 additions and 3 deletions

View File

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

View File

@@ -566,8 +566,9 @@ describe('backup/non-bubble messages', () => {
timestamp: 1,
readStatus: ReadStatus.Read,
seenStatus: SeenStatus.Seen,
supportedVersionAtReceive: 5,
requiredProtocolVersion: 6,
supportedVersionAtReceive:
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.options = this.pollCreate.options.slice();
proto.pollCreate = create;
proto.requiredProtocolVersion = Proto.DataMessage.ProtocolVersion.POLLS;
}
this.dataMessage = proto;