Skip to content

regression: federated reactions dropped or sent as raw shortcode text - #41606

Closed
KevLehman wants to merge 1 commit into
release-8.7.0from
regression/federation-emoji-converter
Closed

regression: federated reactions dropped or sent as raw shortcode text#41606
KevLehman wants to merge 1 commit into
release-8.7.0from
regression/federation-emoji-converter

Conversation

@KevLehman

@KevLehman KevLehman commented Jul 28, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

The federation emoji converter (ee/packages/federation-matrix/src/utils/emojiConverter.ts) built its shortcode maps from the emojibase preset, while the app emoji list is joypixels-first since the native emoji migration (#39411, aligned by #41587). The converter was never updated, breaking federated reactions in both directions:

  • RC → Matrix: joypixels-only shortnames (:slight_smile:, :upside_down:, tone variants like :hand_splayed_tone3:) don't resolve, so Matrix/Element users see the literal shortcode text as the reaction key instead of the emoji.
  • Matrix → RC: unicodeToShortname emits emojibase-primary names (:grinning_face_with_big_eyes:) that are not in the app's emoji.list, so setReaction throws Invalid emoji provided and the reaction is silently dropped. Affects ~620 emojis including 😃 😄 😅 😘 🤗 😎.
  • Matrix → RC (unqualified keys): reaction keys without VS16 (bare 👍, ❤ — what most clients send) missed the map keyed on fully-qualified strings and were dropped the same way.
  • Same-emoji reactions split into two chips (:thumbsup: local vs :+1: federated), and contested shortcodes diverged in meaning (:cat: → 🐈 outbound while RC renders 🐱).

Fix aligns the converter with the app's emoji data:

  • joypixels-first shortcode lookup (same pattern as regression: shortcodes changed meaning #41587)
  • bare-form (VS16-stripped) unicode aliases for inbound keys
  • legacy emojione shortcode backfill (mirrors the app's legacyEmojioneMap)

Issue(s)

Regression from #39411

Steps to test or reproduce

  1. Federate a room between Rocket.Chat and a Matrix server (Element).
  2. From RC, react to a message with 🙂 (:slight_smile:) → Element previously showed the literal text :slight_smile:; now shows 🙂.
  3. From Element, react with 😃 or bare 👍 → RC previously dropped the reaction with Invalid emoji provided in logs; now the reaction appears and aggregates with local :thumbsup: reactions.

Further comments

Unit spec added covering both directions, tone variants, legacy shortcodes and unqualified keys. No changeset (regression fix targeting release-8.7.0).

Review in cubic

The federation emoji converter built its maps from the emojibase
shortcode preset while the app emoji list is joypixels-first, so
outbound reactions with joypixels-only shortnames reached Matrix as
literal text and inbound emojibase-primary shortnames were rejected
by setReaction. Unqualified reaction keys (no VS16) also missed the
unicode map. Align the converter with the app: joypixels-first
shortcodes, bare-form unicode aliases, legacy emojione backfill.
@dionisio-bot

dionisio-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

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

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5f40a21e-1004-4a88-bea0-ddf080165e82

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3e42984

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.40%. Comparing base (9bd5a7d) to head (3e42984).
⚠️ Report is 1 commits behind head on release-8.7.0.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           release-8.7.0   #41606   +/-   ##
==============================================
  Coverage          68.40%   68.40%           
==============================================
  Files               4139     4140    +1     
  Lines             158309   158335   +26     
  Branches           28305    28324   +19     
==============================================
+ Hits              108290   108314   +24     
- Misses             44882    44884    +2     
  Partials            5137     5137           
Flag Coverage Δ
e2e 58.85% <ø> (-0.03%) ⬇️
e2e-api 45.35% <ø> (-0.02%) ⬇️
unit 70.35% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant