From 8aa7ff4bbbfbb91cd67a4800995335ec8f545ce7 Mon Sep 17 00:00:00 2001 From: Matt Keller Date: Mon, 7 Nov 2022 09:42:47 -0500 Subject: [PATCH] slack: Parse emoji skin tone variants. Fixes part of #23276. --- zerver/data_import/slack.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.py index 3b1002ee9a..03bfce7e40 100755 --- a/zerver/data_import/slack.py +++ b/zerver/data_import/slack.py @@ -1123,7 +1123,11 @@ def build_reactions( # For the Unicode emoji codes, we use equivalent of # function 'emoji_name_to_emoji_code' in 'zerver/lib/emoji' here for slack_reaction in reactions: - emoji_name = slack_reaction["name"] + # Slack's data exports use encode skin tone variants on emoji + # reactions like this: `clap::skin-tone-2`. For now, we only + # use the name of the base emoji, since Zulip's emoji + # reactions system doesn't yet support skin tone modifiers. + emoji_name = slack_reaction["name"].split("::", maxsplit=1)[0] if emoji_name in slack_emoji_name_to_codepoint: emoji_code = slack_emoji_name_to_codepoint[emoji_name] try: