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.
This commit is contained in:
parent
b784b68bcd
commit
ab280b44cc
1 changed files with 2 additions and 0 deletions
|
@ -10,6 +10,8 @@ from typing import Set, Iterable
|
||||||
from slixmpp.xmlstream import ElementBase
|
from slixmpp.xmlstream import ElementBase
|
||||||
try:
|
try:
|
||||||
from emoji import UNICODE_EMOJI
|
from emoji import UNICODE_EMOJI
|
||||||
|
if UNICODE_EMOJI.get('en'):
|
||||||
|
UNICODE_EMOJI = UNICODE_EMOJI['en']
|
||||||
except ImportError:
|
except ImportError:
|
||||||
UNICODE_EMOJI = None
|
UNICODE_EMOJI = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue