summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-01-24 11:31:17 +0100
committermathieui <mathieui@mathieui.net>2021-01-24 11:31:17 +0100
commitab280b44cc5c85d179dc655183e211587d586207 (patch)
tree1b5ffd93ede5d455cfadc5a9b2466f8b631a1032
parentb784b68bcdface791f2a6e0e0a5482096b03ee06 (diff)
downloadslixmpp-ab280b44cc5c85d179dc655183e211587d586207.tar.gz
slixmpp-ab280b44cc5c85d179dc655183e211587d586207.tar.bz2
slixmpp-ab280b44cc5c85d179dc655183e211587d586207.tar.xz
slixmpp-ab280b44cc5c85d179dc655183e211587d586207.zip
XEP-0444: Fix emoji detection
the emoji lib just released a major release after 5 years, which breaks the API. This new code is compatible with both.
-rw-r--r--slixmpp/plugins/xep_0444/stanza.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0444/stanza.py b/slixmpp/plugins/xep_0444/stanza.py
index 338a244e..4d652116 100644
--- a/slixmpp/plugins/xep_0444/stanza.py
+++ b/slixmpp/plugins/xep_0444/stanza.py
@@ -10,6 +10,8 @@ from typing import Set, Iterable
from slixmpp.xmlstream import ElementBase
try:
from emoji import UNICODE_EMOJI
+ if UNICODE_EMOJI.get('en'):
+ UNICODE_EMOJI = UNICODE_EMOJI['en']
except ImportError:
UNICODE_EMOJI = None