From f0e9de4cf9977801ddb489bae43abc3da6773e14 Mon Sep 17 00:00:00 2001 From: ginnyTheCat Date: Fri, 11 Mar 2022 06:03:58 +0100 Subject: [PATCH] Fix not all emoji-only messages being detected as jumbo emoji (#368) --- src/app/molecules/message/Message.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/molecules/message/Message.jsx b/src/app/molecules/message/Message.jsx index c1ceda8..9c596e1 100644 --- a/src/app/molecules/message/Message.jsx +++ b/src/app/molecules/message/Message.jsx @@ -201,10 +201,10 @@ const MessageBody = React.memo(({ // Count the number of emojis const nEmojis = content.filter((e) => e.type === 'img').length; - // Make sure there's no text besides whitespace + // Make sure there's no text besides whitespace and variation selector U+FE0F if (nEmojis <= 10 && content.every((element) => ( (typeof element === 'object' && element.type === 'img') - || (typeof element === 'string' && /^\s*$/g.test(element)) + || (typeof element === 'string' && /^[\s\ufe0f]*$/g.test(element)) ))) { emojiOnly = true; }