Increase requiredProtocolVersion if quote includes @mention

This commit is contained in:
Scott Nonnenberg 2020-09-16 16:34:01 -07:00 committed by Josh Perez
parent 9657c38987
commit c2275b6aed

View file

@ -288,6 +288,15 @@ class Message {
bodyRange.mentionUuid = range.mentionUuid;
return bodyRange;
});
if (
quote.bodyRanges.length &&
(!proto.requiredProtocolVersion ||
proto.requiredProtocolVersion <
window.textsecure.protobuf.DataMessage.ProtocolVersion.MENTIONS)
) {
proto.requiredProtocolVersion =
window.textsecure.protobuf.DataMessage.ProtocolVersion.MENTIONS;
}
}
if (this.expireTimer) {
proto.expireTimer = this.expireTimer;