Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
push notifications: Use hex_codepoint_to_emoji.
evykassirerb9303a6506e9
diff --git a/zerver/lib/push_notifications.py b/zerver/lib/push_notifications.pyindex 868af677b63..8998162dff1 100644--- a/zerver/lib/push_notifications.py+++ b/zerver/lib/push_notifications.py@@ -20,6 +20,7 @@ from django.utils.translation import override as override_languagefrom typing_extensions import TypeAliasfrom zerver.lib.avatar import absolute_avatar_url+from zerver.lib.emoji_utils import hex_codepoint_to_emojifrom zerver.lib.exceptions import JsonableErrorfrom zerver.lib.message import access_message, huddle_usersfrom zerver.lib.outgoing_http import OutgoingSession@@ -708,10 +709,7 @@ def get_mobile_push_content(rendered_content: str) -> str:match = re.search(r"emoji-(?P<emoji_code>\S+)", classes)if match:emoji_code = match.group("emoji_code")- char_repr = ""- for codepoint in emoji_code.split("-"):- char_repr += chr(int(codepoint, 16))- return char_repr+ return hex_codepoint_to_emoji(emoji_code)# Handles realm emojis, avatars etc.if elem.tag == "img":return elem.get("alt", "")