From c2275b6aed0291a36399ebe638e7a5068e79aa03 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 16 Sep 2020 16:34:01 -0700 Subject: [PATCH] Increase requiredProtocolVersion if quote includes @mention --- ts/textsecure/SendMessage.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ts/textsecure/SendMessage.ts b/ts/textsecure/SendMessage.ts index 2cd766142..07c6c4444 100644 --- a/ts/textsecure/SendMessage.ts +++ b/ts/textsecure/SendMessage.ts @@ -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;