mirror of https://github.com/zulip/zulip.git
emoji: Start using `get_active_emoji()` in `emoji_name_to_emoji_code()`.
This commit is contained in:
parent
23c8da205c
commit
646700b144
|
@ -46,9 +46,9 @@ with open(CODEPOINT_TO_NAME_PATH) as fp:
|
||||||
codepoint_to_name = ujson.load(fp)
|
codepoint_to_name = ujson.load(fp)
|
||||||
|
|
||||||
def emoji_name_to_emoji_code(realm: Realm, emoji_name: Text) -> Tuple[Text, Text]:
|
def emoji_name_to_emoji_code(realm: Realm, emoji_name: Text) -> Tuple[Text, Text]:
|
||||||
realm_emojis = realm.get_emoji()
|
realm_emojis = realm.get_active_emoji()
|
||||||
realm_emoji = realm_emojis.get(emoji_name)
|
realm_emoji = realm_emojis.get(emoji_name)
|
||||||
if realm_emoji is not None and not realm_emoji['deactivated']:
|
if realm_emoji is not None:
|
||||||
return str(realm_emojis[emoji_name]['id']), Reaction.REALM_EMOJI
|
return str(realm_emojis[emoji_name]['id']), Reaction.REALM_EMOJI
|
||||||
if emoji_name == 'zulip':
|
if emoji_name == 'zulip':
|
||||||
return emoji_name, Reaction.ZULIP_EXTRA_EMOJI
|
return emoji_name, Reaction.ZULIP_EXTRA_EMOJI
|
||||||
|
|
Loading…
Reference in New Issue