Skip to content

Conversation

@marcellintacite
Copy link
Contributor

Feature: Add support for XEP-0444 Message Reactions

Description

This PR implements XEP-0444: Message Reactions, allowing users to react to messages with emojis. It introduces a new plugin (reactions) that handles the UI for picking reactions, displaying them on messages, and managing the underlying XMPP stanza logic.

Key Changes

1. New Plugin: reactions

  • Created a standalone plugin structure in src/plugins/reactions/.
  • Implemented logic to parse incoming <reaction> elements from message stanzas.
  • Implemented logic to send reaction stanzas with the correct XML namespace (urn:xmpp:reactions:0).
  • Added optimistic UI updates (reactions appear immediately before server confirmation).

2. UI Components

  • Reaction Picker (converse-reaction-picker):
    • Added a "Quick Actions" bar showing popular emojis (👍, ❤️, 😂, 😮).
    • Integrated a full emoji picker dropdown (lazy-loaded for performance).
    • Styled with glassmorphism effects to blend with the chat interface.
    • Uses CSS Anchor Positioning (with fallbacks) for robust dropdown placement.
  • Message Bubbles:
    • Updated message templates to render reaction "pills" below messages.
    • Styled to resemble modern chat apps (Slack-like): rounded pills, hover effects, and active states.
    • Reactions are aggregated (e.g., "👍 3").
    • Clicking an existing reaction toggles it (edit your vote).

3. Technical Details

  • Standard Compliance: Fully compliant with XEP-0444: Message Reactions.
  • Styling: Reused existing emoji picker styles (src/shared/chat/styles/emoji.scss) to ensure consistency between the chat input and the reaction picker.

Screenshots / Video

emoji_converse.mp4

This still a Draft

  • Add a changelog entry for your change in CHANGES.md
  • When adding a configuration variable, please make sure to
    document it in docs/source/configuration.rst
  • Please add a test for your change. Tests can be run in the commandline
    with make check or you can run them in the browser by running make serve

@marcellintacite marcellintacite marked this pull request as draft November 23, 2025 07:51
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