New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Option to Join Read-Only Channels #27488
[FIX] Option to Join Read-Only Channels #27488
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #27488 +/- ##
===========================================
+ Coverage 41.58% 42.62% +1.03%
===========================================
Files 826 799 -27
Lines 16948 16445 -503
Branches 2074 1999 -75
===========================================
- Hits 7048 7009 -39
+ Misses 9620 9161 -459
+ Partials 280 275 -5
Flags with carried forward coverage won't be shown. Click here to find out more. |
d144ea1
to
c8af645
Compare
225706d
to
2f2dfd4
Compare
apps/meteor/client/views/room/components/body/composer/ComposerReadOnly.tsx
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/room/components/body/composer/ComposerReadOnly.tsx
Outdated
Show resolved
Hide resolved
574179c
to
d355cb2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great work 👏
Thank you so much, Murtaza |
apps/meteor/client/views/room/components/body/composer/ComposerReadOnly.tsx
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/room/components/body/composer/ComposerReadOnly.tsx
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/room/components/body/composer/ComposerReadOnly.tsx
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/room/components/body/composer/ComposerReadOnly.tsx
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/room/components/body/composer/ComposerReadOnly.tsx
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/room/components/body/composer/ComposerReadOnly.tsx
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/room/components/body/composer/ComposerReadOnly.tsx
Outdated
Show resolved
Hide resolved
Dismissing review since its blocking merge. @Debdut feel free to re-request review if required
The following PR is currently Ready for Review.
Special thanks to @milton-rucks, for guiding me throughout this PR.
Issue in brief:
There is no
Join Option
to join a read-only channel, there is only a staticMessageBox
indicating the read-only status of the room.Steps to reproduce:
Expected behavior:
A non-administrator user can by himself join channels in read-only mode.
Motivation:
Considering a scenario where a read-only room is meant for very crucial updates from significant administrators like CEOs and CFOs, an individual will find it necessary to be able to,
Technical Reasoning
Issue
ComposerReadOnly
element which leads to the display of a simpleMessageFooterCallout
with content as "Room is read-only".Solution
room_id
, for this I useduseRoom()
hook.ComposerContainer
element or can be fetched from theuseUserIsSubscribed()
hook, I used the second approach.joinRoom
functionality need to be triggered with the above entities, can be done in three ways:joinRoom
endpoint.chatMessage's
,dataAPI
provided by thecomposerContainer
using thedataAPI's JoinRoom
method.joinRoom
, meteor call.Out of all three, I choose the third approach for this method.
Outcome and Preview
Screen.Recording.2022-12-14.at.6.05.05.PM.mov
Closes #27412