fix: strip emoji variation selectors in approval reaction matching

Element appends U+FE0F to emoji reactions (👍️ vs 👍). Strip before
matching against approval map.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-03-18 18:30:36 +02:00
parent 62d11ddfa8
commit 69ac33eb0a

View File

@@ -15,4 +15,6 @@ APPROVAL_REACTIONS = {
def reaction_to_response(reaction_key: str) -> str | None: def reaction_to_response(reaction_key: str) -> str | None:
"""Map a reaction emoji to an approval response.""" """Map a reaction emoji to an approval response."""
return APPROVAL_REACTIONS.get(reaction_key) # Strip variation selectors (U+FE0E, U+FE0F) — Element often appends these
cleaned = reaction_key.replace("\ufe0f", "").replace("\ufe0e", "")
return APPROVAL_REACTIONS.get(cleaned) or APPROVAL_REACTIONS.get(reaction_key)