Skip to content

fix: migrate deprecated emojione to emoji-toolkit#38252

Closed
mddanishh18 wants to merge 2 commits intoRocketChat:developfrom
mddanishh18:fix/migrate-emojione-to-emoji-toolkit
Closed

fix: migrate deprecated emojione to emoji-toolkit#38252
mddanishh18 wants to merge 2 commits intoRocketChat:developfrom
mddanishh18:fix/migrate-emojione-to-emoji-toolkit

Conversation

@mddanishh18
Copy link
Copy Markdown

@mddanishh18 mddanishh18 commented Jan 19, 2026

This commit replaces the deprecated emojione library with emoji-toolkit (JoyPixels) to support Unicode 13-16 emojis.

Changes:

  • Rewrite getEmojiConfig.ts to use emoji-toolkit (removed 250+ lines of legacy patches)
  • Update all files importing from 'emojione' to use 'emoji-toolkit'

Fixes #38247

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Refactor

    • Replaced underlying emoji provider across the app for more consistent rendering and picker behavior.
  • New Features

    • Enabled sprite-based emoji rendering for improved performance and visual consistency.
    • Upgraded emoji support to newer Unicode versions for broader emoji coverage.

This commit replaces the deprecated emojione library with emoji-toolkit
(JoyPixels) to support Unicode 13-16 emojis.

Changes:
- Rewrite getEmojiConfig.ts to use emoji-toolkit (removed 250+ lines of legacy patches)
- Update all files importing from 'emojione' to use 'emoji-toolkit'

Fixes RocketChat#38247
@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Jan 19, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 19, 2026

🦋 Changeset detected

Latest commit: 0c9a163

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 40 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jan 19, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 19, 2026

Walkthrough

Replaces the deprecated emojione library with emoji-toolkit (joypixels) across client, server, and federation code; consolidates emoji rendering to joypixels, enables sprite settings, and removes legacy emojione-specific patches and mappings.

Changes

Cohort / File(s) Summary
Core Emoji Configuration
apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts
Swap emojione → emoji-toolkit, remove large legacy patch block, expose internal alias to preserve API shape, enable sprite rendering options, update isEmojiSupported signature, and wire render/renderPicker to joypixels methods.
Server-Side Emoji Processing
apps/meteor/app/emoji-emojione/server/callbacks.ts, apps/meteor/app/lib/server/lib/sendNotificationsOnMessage.ts
Import source changed to emoji-toolkit; existing calls like shortnameToUnicode remain unchanged.
Client-Side Emoji Rendering
apps/meteor/app/emoji/client/lib.ts, apps/meteor/client/sidebar/RoomList/normalizeSidebarMessage.ts, apps/meteor/client/views/navigation/lib/normalizeNavigationMessage.ts
Imports updated to emoji-toolkit; continued usage of toImage and shortnameToUnicode APIs expected to be compatible.
Federation / Reactions
ee/packages/federation-matrix/src/FederationMatrix.ts, ee/packages/federation-matrix/src/events/reaction.ts
Emoji import switched to emoji-toolkit; minor formatting/type union indentation changes in federation code, no behavioral changes.
Changeset
.changeset/emoji-toolkit-migration.md
Add migration changeset documenting move from emojione to emoji-toolkit for Unicode coverage update.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I nibble code and twitch my nose,
JoyPixels hop where old code froze.
Sprites now sparkle, shortnames sing,
Legacy crumbs I lightly fling—
New emojis leap, a joyful prose! 🎨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: migrating from deprecated emojione to emoji-toolkit across the codebase.
Linked Issues check ✅ Passed The PR successfully addresses issue #38247 by replacing deprecated emojione with emoji-toolkit to support Unicode 13–16 emojis.
Out of Scope Changes check ✅ Passed All changes are directly related to the emojione-to-emoji-toolkit migration; no unrelated modifications are present in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mddanishh18 mddanishh18 marked this pull request as ready for review January 19, 2026 08:15
@mddanishh18 mddanishh18 requested a review from a team as a code owner January 19, 2026 08:15
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 8 files

@mddanishh18
Copy link
Copy Markdown
Author

Hi team

All checks are passing for this PR.
Could someone please review and help add the required labels/milestone if everything looks good?
Thanks!

@dougfabris @cardoso @Harmeet221

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.changeset/emoji-toolkit-migration.md (1)

2-2: Consider whether minor is more appropriate than patch.

Adding support for Unicode 13–16 emojis is a new user-visible capability, which in semver terms maps to minor. patch is defensible only if the project convention treats dependency migrations purely as bug fixes regardless of the expanded feature set.

♻️ Proposed change
-"@rocket.chat/meteor": patch
+"@rocket.chat/meteor": minor
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.changeset/emoji-toolkit-migration.md at line 2, The changeset currently
marks the dependency change "@rocket.chat/meteor": patch but the addition of
Unicode 13–16 emoji support is a user-visible feature and should be a minor
release; update the changeset entry to use "minor" instead of "patch" (replace
the string value for "@rocket.chat/meteor"), update the changeset
description/title to reflect a minor feature bump, and ensure any release notes
or PR title match the new minor semver intent.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c1c298 and 0c9a163.

📒 Files selected for processing (1)
  • .changeset/emoji-toolkit-migration.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: cubic · AI code reviewer
🔇 Additional comments (1)
.changeset/emoji-toolkit-migration.md (1)

2-3: No action needed. The @rocket.chat/federation-matrix package is marked as "private": true in its package.json, meaning it is not published to any public registry. Private packages in monorepos do not require separate changeset entries—only published packages need them.

Likely an incorrect or invalid review comment.

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/emoji-toolkit-migration.md:
- Line 5: The changeset "fix: migrate deprecated emojione to emoji-toolkit to
support Unicode 13-16 emojis" requires confirmed JoyPixels commercial licensing
before merging: obtain written verification from JoyPixels that our intended use
(Rocket.Chat distributing emoji assets to end users as part of a commercial
SaaS) is covered by a paid JoyPixels tier, record the approved license type
(Premium/Pro/Enterprise) and license file or purchase receipt in the repo or
legal ticket, update the PR description to state the license approval and attach
the written permission, and if approval cannot be obtained replace emoji-toolkit
assets with an alternative that permits commercial distribution or implement
configurable asset sourcing to avoid unlicensed JoyPixels artwork.

---

Nitpick comments:
In @.changeset/emoji-toolkit-migration.md:
- Line 2: The changeset currently marks the dependency change
"@rocket.chat/meteor": patch but the addition of Unicode 13–16 emoji support is
a user-visible feature and should be a minor release; update the changeset entry
to use "minor" instead of "patch" (replace the string value for
"@rocket.chat/meteor"), update the changeset description/title to reflect a
minor feature bump, and ensure any release notes or PR title match the new minor
semver intent.

"@rocket.chat/meteor": patch
---

fix: migrate deprecated emojione to emoji-toolkit to support Unicode 13-16 emojis
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

emoji-toolkit JoyPixels commercial license requirements free vs paid

💡 Result:

  • emoji-toolkit (the code): the toolkit libraries themselves are MIT-licensed (free to use, including commercially). But that does not automatically grant rights to the JoyPixels emoji artwork/images the toolkit can output. [1]

JoyPixels artwork/images: “free” vs “paid” (commercial)

Free license (JoyPixels 10 Free)

  • Personal use onlyno commercial / money-generating use, including monetized content or platforms that solicit donations/contributions. [3]
  • Format/size limits: PNG only, max 64×64; other formats (e.g., SVG/fonts) are testing-only. [3]
  • Major restrictions (examples): no business/non-profit use, no ads/promotions, no resale/redistribution, no open-source projects, no logos/trademarks, no allowing others to extract assets, and no modifications (color/shape/etc.). [3]
  • Summary of what’s included/positioning (“personal use, development testing, design mockups”) is also reflected on JoyPixels’ license page. [2]

Paid licenses (commercial use)

  • Premium: intended for commercial businesses under $1M annual revenue; includes higher-quality assets (e.g., larger PNGs + SVG, plus animated formats), with download limits. [2]
  • Pro: intended for entities up to $50M annual revenue; commercial use across many channels (web/apps, social, ads, print, etc.) but still has important limitations (e.g., no logo use, no modifications without written permission, no third-party/client production under your license; some use cases require Enterprise). [4]
  • Enterprise: required for certain higher-scale/special uses (the Pro terms explicitly call out examples like TV/film productions and TV/streaming ad campaigns needing Enterprise). [4]

Practical takeaway: you can use emoji-toolkit in commercial software under MIT, but if you ship/display JoyPixels emoji images, you generally need a paid JoyPixels license (Premium/Pro/Enterprise) unless your use fits the personal-only Free license. [1][3][4]


🌐 Web query:

emoji-toolkit npm package license terms conditions

💡 Result:

emoji-toolkit (npm) licensing is split into two parts:

  1. Non-artwork (the code/data): MIT License
    The JoyPixels emoji-toolkit “non-artwork” (JavaScript/JSON/PHP/CSS/HTML, etc.) is licensed under MIT. (raw.githubusercontent.com)

  2. Artwork (the emoji images/assets): JoyPixels license terms (not MIT)
    Using JoyPixels artwork is governed by JoyPixels’ own license terms (the toolkit’s LICENSE points you to their Free License terms, and to paid plans for broader use). (raw.githubusercontent.com)

Key conditions in the JoyPixels Free License (v10.0, dated Oct 28, 2025):

  • You must accept the license by using the assets. (app.joypixels.com)
  • Personal use only (no commercial / money-generating use, including donations). (app.joypixels.com)
  • PNG only, max 64×64 under the free terms (other formats are for testing only). (app.joypixels.com)
  • Prohibits redistribution/sublicensing, allowing others to extract assets, using in logos, modifying the artwork, and more. (app.joypixels.com)

(For reference, the GitHub repo shows a 10.0.0 release dated Dec 5, 2025.) (github.com)

Citations:


🏁 Script executed:

# Check the npm registry for emoji-toolkit package details
npm view emoji-toolkit | head -50

Repository: RocketChat/Rocket.Chat

Length of output: 916


Confirm JoyPixels commercial licensing compliance before shipping.

The emoji-toolkit library code itself is MIT-licensed, but the JoyPixels artwork/images bundled with it are governed by separate JoyPixels license terms. The free tier explicitly prohibits commercial and money-generating use, including business applications and platforms with donations. Rocket.Chat is a commercial SaaS product that distributes these emoji assets to end users, which constitutes commercial use requiring a paid JoyPixels license (Premium, Pro, or Enterprise tier depending on revenue scale). Obtain written verification of appropriate commercial licensing from JoyPixels before merging.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.changeset/emoji-toolkit-migration.md at line 5, The changeset "fix: migrate
deprecated emojione to emoji-toolkit to support Unicode 13-16 emojis" requires
confirmed JoyPixels commercial licensing before merging: obtain written
verification from JoyPixels that our intended use (Rocket.Chat distributing
emoji assets to end users as part of a commercial SaaS) is covered by a paid
JoyPixels tier, record the approved license type (Premium/Pro/Enterprise) and
license file or purchase receipt in the repo or legal ticket, update the PR
description to state the license approval and attach the written permission, and
if approval cannot be obtained replace emoji-toolkit assets with an alternative
that permits commercial distribution or implement configurable asset sourcing to
avoid unlicensed JoyPixels artwork.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the licensing flag. I've noted this concern — could the maintainers confirm if Rocket.Chat holds a commercial JoyPixels license, or if an alternative library would be preferred for this migration?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# Search for any existing JoyPixels or emoji licensing documentation
echo "=== Searching for JoyPixels/emoji licensing references ==="
rg -i 'joypixels|emoji.*(license|licensing|commercial)' --type md --type txt -C 2

echo -e "\n=== Checking LICENSE files ==="
fd -t f '^LICENSE' -x cat {}

echo -e "\n=== Searching for emoji asset attribution or licensing in package.json files ==="
fd -t f 'package.json' -x cat {} | grep -A 5 -B 5 -i 'emoji\|joypixels' | head -100

echo -e "\n=== Checking for any existing emojione licensing documentation ==="
rg -i 'emojione.*(license|commercial|attribution)' --type md --type txt -C 2

echo -e "\n=== Looking for NOTICE or THIRD_PARTY files ==="
fd -i 'notice|third.?party|attribution' -t f -x cat {}

Length of output: 18558


@mddanishh18 Great question for the maintainers. Based on my search of the repository, I found some helpful context:

Existing JoyPixels Usage:

  • The README.md credits: "Emoji provided graciously by JoyPixels"
  • HISTORY.md shows Rocket.Chat upgraded from EmojiOne to JoyPixels 4.5.0 back in PR #13807 (circa 2019)
  • Your PR is essentially completing that migration by updating the remaining emojione imports to emoji-toolkit

Licensing Documentation:

  • No explicit JoyPixels commercial license documentation found in the repository
  • The main LICENSE files note that "third-party components are licensed under the original license provided by the owner"
  • This doesn't mean Rocket.Chat doesn't have a license—it could be managed through legal/procurement systems outside the codebase

Recommendation:
Since Rocket.Chat has been distributing JoyPixels assets since 2019, @dougfabris, @cardoso, or @Harmeet221 (tagged reviewers) should be able to confirm the licensing status. If there's any uncertainty:

Alternative Libraries (if JoyPixels licensing is a blocker):

  • Twemoji (Twitter's emoji set) - MIT licensed, commercially permissive
  • Noto Emoji (Google) - Apache 2.0/OFL licensed
  • OpenMoji - CC BY-SA 4.0 licensed

Since the repository already credits JoyPixels and has used their assets for 5+ years, this PR likely continues under existing licensing arrangements. But explicit maintainer confirmation would be prudent before merging.


🧠 Learnings used
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37408
File: apps/meteor/client/views/admin/ABAC/useRoomAttributeOptions.tsx:53-69
Timestamp: 2025-11-10T19:06:20.146Z
Learning: In the Rocket.Chat repository, do not provide suggestions or recommendations about code sections marked with TODO comments. The maintainers have already identified these as future work and external reviewers lack the full context about implementation plans and timing.

Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.

Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 38068
File: apps/meteor/tests/data/apps/app-packages/README.md:14-16
Timestamp: 2026-01-08T15:03:59.621Z
Learning: For the RocketChat/Rocket.Chat repository, do not analyze or report formatting issues (such as hard tabs vs spaces, line breaks, etc.). The project relies on automated linting tools to enforce formatting standards.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 9 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts">

<violation number="1" location="apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts:15">
P2: emoji-toolkit defaults to JoyPixels class names; without configuring a compatibility class/prefix, the generated sprite markup will use `joypixels` classes that don’t match Rocket.Chat’s existing `.emojione` sprite CSS, so emoji sprites may not render.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.


// TODO remove fix below when issue is solved: https://github.com/joypixels/emojione/issues/617
// Configure emoji-toolkit for sprite mode (matches Rocket.Chat's existing behavior)
joypixels.sprites = true;
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: emoji-toolkit defaults to JoyPixels class names; without configuring a compatibility class/prefix, the generated sprite markup will use joypixels classes that don’t match Rocket.Chat’s existing .emojione sprite CSS, so emoji sprites may not render.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts, line 15:

<comment>emoji-toolkit defaults to JoyPixels class names; without configuring a compatibility class/prefix, the generated sprite markup will use `joypixels` classes that don’t match Rocket.Chat’s existing `.emojione` sprite CSS, so emoji sprites may not render.</comment>

<file context>
@@ -1,281 +1,36 @@
 
-// TODO remove fix below when issue is solved: https://github.com/joypixels/emojione/issues/617
+// Configure emoji-toolkit for sprite mode (matches Rocket.Chat's existing behavior)
+joypixels.sprites = true;
+joypixels.spriteSize = '32';
+joypixels.ascii = true;
</file context>
Fix with Cubic

@engelgabriel
Copy link
Copy Markdown
Member

Closing this PR in favor of #39411, where we’re replacing Emojione with native Unicode emojis.

It’s still a draft, and we’d love help from the community to get it across the finish line 🙌

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emoji picker uses deprecated emojione assets and lacks Unicode 13–16 emojis

3 participants