bug: iisReadOnly isn’t reactive — UI doesn’t update when permissions change
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
Hi! @deepakbhagatiitr I would like to work on this issue.
I’m still a beginner in open-source, but I’m comfortable with React and basic state management. I want to learn and contribute regularly to Rocket.Chat, and this issue seems like a good place to start.
Could you please assign it to me?
If there’s anything specific I should check before starting, please let me know. Thanks!
have already raised pr @shagunagg12 you can explore and understand codebase and if you find any issue or feature you can raise it...
Hi @deepak0x,
Thanks for the detailed explanation and for raising this PR. I understand that this issue is already being worked on. I’d like to take this opportunity to explore the Rocket.Chat codebase, especially around RoomView and permission handling, to learn more.
As I’m still getting comfortable with React Native and state management, I would really appreciate any guidance or pointers on which parts of the code I should focus on first.
If I find any small related improvements or bugs, would it be okay to raise separate PRs for them?
Looking forward to contributing and learning from this codebase!