From cfe2911d300625a3a22dd8afecb32b70eeea02d9 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Sun, 14 Jan 2018 23:39:37 +0100 Subject: Reload emoji list on emoji change event It's simpler to just reload the whole list instead of adding and removing specific emojis, especially since we would have to remove aliases for an emoji when the emoji is removed (and we don't store if an emoji is an alias or not). Since this probably doesn't happen that often, it shouldn't be a problem to do it this way. --- wee_slack.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'wee_slack.py') diff --git a/wee_slack.py b/wee_slack.py index 5eee13d..94dce4c 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -2497,6 +2497,11 @@ def process_reaction_removed(message_json, eventrouter, **kwargs): else: dbg("Reaction to item type not supported: " + str(message_json)) + +def process_emoji_changed(message_json, eventrouter, **kwargs): + team = kwargs['team'] + team.load_emoji_completions() + ###### New module/global methods def render_formatting(text): -- cgit