fix: reactions disabled when editing room#6969
Conversation
WalkthroughCoerce Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
app/views/RoomInfoEditView/index.tsx
Outdated
| } | ||
| // React When Read Only | ||
| if (room.reactWhenReadOnly !== reactWhenReadOnly) { | ||
| if ((room.reactWhenReadOnly ?? false) !== reactWhenReadOnly) { |
There was a problem hiding this comment.
use || (treats all falsy values as empty) not ?? (only null or undefined).
Proposed changes
Prevent reactions from being disabled when editing a room by correctly handling null values for reactWhenReadOnly.
Issue(s)
https://rocketchat.atlassian.net/browse/CORE-1804
How to test or reproduce
Expected behavior: Only the room description should be updated.
Actual behavior: It updates the room description and disables reactions.
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit