Skip to content

Validate Unicode Tapbacks against the active helper capability - #870

Draft
chrisbutler wants to merge 5 commits into
BlueBubblesApp:developmentfrom
chrisbutler:feat/unicode-tapback-review
Draft

chrisbutler wants to merge 5 commits into
BlueBubblesApp:developmentfrom
chrisbutler:feat/unicode-tapback-review

Conversation

@chrisbutler

@chrisbutler chrisbutler commented Oct 19, 2026 •

Copy link
Copy Markdown

Unicode reactions need a verified helper capability and a single validation/serialization contract across REST, Socket.IO, and the private API. Without that, a server can accept a reaction its running helper cannot send, or serialize an unrelated classic reaction incorrectly when an emoji field is present.

This is a draft follow-up stacked on #839 (head 68b72b9897c574c44bd41bf79556c99695407ec7). Zach Garcia's original advanced-Tapbacks commits remain the foundation and retain their authorship. Merge/rebase #839 first; the incremental contribution to review here is commit 6c16e45 relative to that head. GitHub's full development comparison currently includes #839's changes and its existing helper resources; this follow-up adds source/tests only and does not replace helper binaries.

  • Read the strict boolean capability from the active Messages helper's ping, clear it when that helper disconnects, and expose it in server metadata.
  • Share bounded, single-grapheme Unicode validation across REST, the shared send interface, and private-API dispatch. Preserve the existing six classic reaction names and their removal forms.
  • Preserve ZWJ, modifier, flag, keycap, and variation-selector sequences in the helper payload. Only emoji Tapback types use the emoji field during serialization; classic types remain classic.

Validation: node --test tests/emoji-reactions.test.cjs passes all eight tests. These run production TypeScript with explicit boundary mocks, covering classic/Unicode add/remove, invalid payloads, exact helper dispatch, disconnect/legacy-helper capability behavior, REST and Socket.IO/direct-call rejection, and metadata. Tests do not launch Electron, connect to Messages, or use a live database.

The full TS check with the installed compiler and --ignoreDeprecations 5.0 remains blocked by the existing ScheduledService.ts NodeJS.Timer/clearInterval type mismatch outside this diff. This is the same baseline limitation documented in the contact PRs.

Depends on the companion helper capability PR: BlueBubblesApp/bluebubbles-helper#78 . Older helpers omit the flag and retain classic reactions; Unicode requests fail closed. Draft review items include agreement on the metadata contract, full server/client integration with #839, and cross-macOS runtime testing. The deployed predecessor stack has user-confirmed Unicode delivery, but these isolated review branches have not been installed over it.

ChatKit delayed loading remains an alternative review branch outside this PR's incremental diff: https://github.com/chrisbutler/bluebubbles-server/tree/review/delayed-helper-loader . Implementation and tests were developed with Codex assistance. No personal messages, contacts, room selections, credentials, or deployment version bumps are added.

Bridge companion: mautrix/imessage#241 . Integration requires rebuilding the helper from #78 and coordinating the bundled helper resource/MD5 refresh through the normal release process; the resources currently inherited from #839 do not advertise the new capability.

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.

3 participants