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:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user