From 646700b1445ebb447812652d3bb6a8e85f3e56c6 Mon Sep 17 00:00:00 2001 From: Harshit Bansal Date: Sun, 18 Mar 2018 16:22:07 +0000 Subject: [PATCH] emoji: Start using `get_active_emoji()` in `emoji_name_to_emoji_code()`. --- zerver/lib/emoji.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/lib/emoji.py b/zerver/lib/emoji.py index 2073103fe9..89dbc145cd 100644 --- a/zerver/lib/emoji.py +++ b/zerver/lib/emoji.py @@ -46,9 +46,9 @@ with open(CODEPOINT_TO_NAME_PATH) as fp: codepoint_to_name = ujson.load(fp) 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) - 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 if emoji_name == 'zulip': return emoji_name, Reaction.ZULIP_EXTRA_EMOJI