From 5f8911d77ac5732b9ebdef287fb95a25f79c6733 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 12 Nov 2021 17:11:53 +0000 Subject: [PATCH] Allow for two character emoji reactions, emoji plus modifier --- reaction.py | 2 +- tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reaction.py b/reaction.py index e93b07235..ab42b71f3 100644 --- a/reaction.py +++ b/reaction.py @@ -51,7 +51,7 @@ def validEmojiContent(emojiContent: str) -> bool: """ if not emojiContent: return False - if len(emojiContent) > 1: + if len(emojiContent) > 2: return False if len(emojiRegex.findall(emojiContent)) == 0: return False diff --git a/tests.py b/tests.py index 6e3641260..5623dac82 100644 --- a/tests.py +++ b/tests.py @@ -5914,7 +5914,7 @@ def _testValidEmojiContent() -> None: assert not validEmojiContent(None) assert not validEmojiContent(' ') assert not validEmojiContent('j') - assert not validEmojiContent('😀😀') + assert not validEmojiContent('😀😀😀') assert validEmojiContent('😀') assert validEmojiContent('😄')