Skip to content

Conversation

@luflow
Copy link

@luflow luflow commented Jan 24, 2026

Adds compatibility with nextcloud/spreed#16835 which splits the combined CHAT permission into separate CHAT (128) and REACT (256) permissions.

This enables "announcement channels" where only moderators can post messages, but all users can still react.

Changes:

  • Add REACT (256) permission constant to ParticipantPermissions
  • Add hasReactPermission() method with backward compatibility fallback
  • Update MessageActionsDialog to use react permission for emoji bar
  • Add permission check in onClickReaction() for toggling reactions
  • Add unit tests for new permission handling

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@AndyScherzinger AndyScherzinger added enhancement New feature or request 3. to review Waiting for reviews labels Jan 24, 2026
Adds compatibility with nextcloud/spreed#16835 which splits the combined
CHAT permission into separate CHAT (128) and REACT (256) permissions.

This enables "announcement channels" where only moderators can post
messages, but all users can still react.

Changes:
- Add REACT (256) permission constant to ParticipantPermissions
- Add hasReactPermission() method with backward compatibility fallback
- Update MessageActionsDialog to use react permission for emoji bar
- Add permission check in onClickReaction() for toggling reactions
- Add unit tests for new permission handling

Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
- Add REACT_PERMISSION feature to SpreedFeatures enum
- Update hasReactPermission() to check react-permission capability first
- Fall back to chat-permission/CHAT bit for older servers
- Expand unit tests for all capability scenarios

Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
@luflow luflow force-pushed the feature/split-chat-and-reaction-permission branch from 373af2f to 294c178 Compare January 26, 2026 12:31
@luflow
Copy link
Author

luflow commented Jan 26, 2026

@AndyScherzinger just updated this branch based on feedback in spreed-PR - also wrote a small migration guide that covers all changes to be more understandable :) https://github.com/luflow/spreed/blob/93bedef92873edbf7a4ae28730c0d514a1cd2f97/docs/react-permission-integration.md

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

Labels

3. to review Waiting for reviews enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants