Skip to content

FIX: Emoji.exists? method to support complex aliased emoji lookups #33130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pangbo13
Copy link
Contributor

@pangbo13 pangbo13 commented Jun 9, 2025

Currently, Emoji.exists? only checks if the alias name exists using Emoji.aliases_values.include?(name). This leads to incorrect false returns for certain variations.

For example, the emoji waving_hand has an alias wave.

  • Emoji.exists?("waving_hand"), Emoji.exists?(":waving_hand:"), and Emoji.exists?(":waving_hand:t2:") all return true.
  • However, Emoji.exists?(":wave:") and Emoji.exists?(":wave:t2:") return false, while only Emoji.exists?("wave") returns true.

image

This PR attempts to resolve this by replacing the alias with the original name and then checking if the emoji exists again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant