diff options
author | mathieui <mathieui@mathieui.net> | 2021-01-24 11:31:17 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-01-24 11:31:17 +0100 |
commit | ab280b44cc5c85d179dc655183e211587d586207 (patch) | |
tree | 1b5ffd93ede5d455cfadc5a9b2466f8b631a1032 | |
parent | b784b68bcdface791f2a6e0e0a5482096b03ee06 (diff) | |
download | slixmpp-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.py | 2 |
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 |