Skip to content

Conversation

@ismael221
Copy link

@ismael221 ismael221 commented Jan 30, 2025

This commit adds support for XEP-0444 (Message Reactions) in Smack. Key changes include:

  • Added ReactionsManager to handle reactions, including adding, removing, and listening for reactions on messages.
  • Introduced ReactionsElement and Reaction classes to represent the element and individual emoji reactions.
  • Added ReactionsFilter to detect messages containing reactions.
  • Implemented ReactionRestrictions to manage restrictions like max reactions per user and allowed emojis.
  • Integrated reaction restrictions with XMPP service discovery.
  • Added ReactionsListener for applications to handle incoming reactions.
  • Included unit tests to verify functionality.

This enables emoji reactions in XMPP messages, with support for restrictions and service discovery.

Related: XEP-0444 (https://xmpp.org/extensions/xep-0444.html)

This commit adds support for XEP-0444 (Message Reactions) in Smack.
Key changes include:

- Added ReactionsManager to handle reactions, including adding,
  removing, and listening for reactions on messages.
- Introduced ReactionsElement and Reaction classes to represent
  the <reactions> element and individual emoji reactions.
- Added ReactionsFilter to detect messages containing reactions.
- Implemented ReactionRestrictions to manage restrictions like
  max reactions per user and allowed emojis.
- Integrated reaction restrictions with XMPP service discovery.
- Added ReactionsListener for applications to handle incoming
  reactions.
- Included unit tests to verify functionality.

This enables emoji reactions in XMPP messages, with support for
restrictions and service discovery.

Related: XEP-0444 (https://xmpp.org/extensions/xep-0444.html)
Copy link
Member

@Flowdalic Flowdalic left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. Gave your PR a quick review from the top of my head. Hence my comments could a bit off and there is probably more.

Also, make sure that your code passes ./gradlew check.

Implemented all requested modifications, addressed feedback, and made necessary changes. The code successfully passed the gradlew check after applying the updates.
@ismael221
Copy link
Author

Hi Flowdalic! I've made all the requested changes from the previous review and addressed the feedback provided. Additionally, the code passed the gradlew check after the updates. Could you please review the PR again? Thank you for your attention!"

@ismael221 ismael221 requested a review from Flowdalic February 11, 2025 07:02
@ismael221 ismael221 marked this pull request as draft February 20, 2025 07:06
@ismael221 ismael221 requested a review from Flowdalic February 20, 2025 07:07
- Added methods to announce reactions support
- Removed support announcement from ReactionsManager constructor
- Created new test classes for better coverage
- Fixed form validation for reaction restrictions
- Updated method signatures for consistency
- Applied checkstyle fixes for code formatting
@ismael221 ismael221 marked this pull request as ready for review March 3, 2025 08:13
@ismael221
Copy link
Author

Ready for review

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.

2 participants