Skip to content

fix: reactions disabled when editing room#6969

Open
Rohit3523 wants to merge 2 commits intodevelopfrom
room-edit-fix
Open

fix: reactions disabled when editing room#6969
Rohit3523 wants to merge 2 commits intodevelopfrom
room-edit-fix

Conversation

@Rohit3523
Copy link
Contributor

@Rohit3523 Rohit3523 commented Feb 5, 2026

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

  1. Create a new channel with default settings (do not change the read-only value), or use an existing channel that still has default settings.
  2. Edit the room description.
  3. Save the changes.

Expected behavior: Only the room description should be updated.

Actual behavior: It updates the room description and disables reactions.

Screenshots

Screenshot 2026-02-05 at 7 40 05 PM

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where a room's "react when read-only" setting could be missed when unset, so edits now correctly register.
    • Prevents unexpected loss of changes to room interaction settings in edit flows.
    • Improves reliability of saving room configuration changes in the UI.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

Walkthrough

Coerce room.reactWhenReadOnly to false for falsy/nullish values during comparison before assigning params.reactWhenReadOnly, preventing undefined values from causing missed updates when saving room edits.

Changes

Cohort / File(s) Summary
RoomInfoEditView change
app/views/RoomInfoEditView/index.tsx
Comparison updated to use a falsy-coercion (`room.reactWhenReadOnly

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nudge the code with gentle paws,
Turning shadows into clear-cut laws.
Where undefined once made things fall,
I wrap it up and make it small.
Now reactions stay — no surprise at all! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main bug fix: preventing reactions from being disabled when editing a room.
Linked Issues check ✅ Passed The code change directly addresses CORE-1804 by coercing null/falsy reactWhenReadOnly values to false during comparison, preventing unintended disabling of reactions when saving room edits.
Out of Scope Changes check ✅ Passed The single-line change in RoomInfoEditView is narrowly scoped to fix the null value handling issue described in CORE-1804 with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch room-edit-fix

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

}
// React When Read Only
if (room.reactWhenReadOnly !== reactWhenReadOnly) {
if ((room.reactWhenReadOnly ?? false) !== reactWhenReadOnly) {
Copy link
Contributor

Choose a reason for hiding this comment

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

use || (treats all falsy values as empty) not ?? (only null or undefined).

@Rohit3523 Rohit3523 requested a deployment to approve_e2e_testing February 5, 2026 18:13 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to official_android_build February 5, 2026 18:15 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_ios_build February 5, 2026 18:15 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_android_build February 5, 2026 18:15 — with GitHub Actions Waiting
Copy link
Contributor

@OtavioStasiak OtavioStasiak left a comment

Choose a reason for hiding this comment

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

Looks good to me!

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