RocketChat / RocketChat/Rocket.Chat.ReactNative
bug: iisReadOnly isn’t reactive — UI doesn’t update when permissions change
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 1.5k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 90
Description
Right now, the isReadOnly function reads permissions using reduxStore.getState(), which is a static snapshot. Because of that, when my permission changes (like when an admin gives me the “post-readonly” permission), the UI doesn’t update. The composer still shows the room as read-only until I leave the screen or restart the app.
Steps to Reproduce
Open a read-only room
Composer is disabled
Admin grants the “post-readonly” permission
Redux store updates
Go back to the room
Composer is still disabled
Expected Behavior
The UI should update immediately when the permission changes.
Actual Behavior
Nothing updates until I navigate away or restart the app.
Rocket.Chat Server Version
any version
Rocket.Chat App Version
4.67.0
Device Name
NA
OS Version
NA
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the isReadOnly function and its use by the composer, then inspect how reduxStore.getState() relates to permission updates. Reproduce the read-only room steps and verify that granting the “post-readonly” permission updates the composer without leaving or restarting the app.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- authorization, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100