fix: "Reply in direct message" should always appear if you have create-d permission#36978
Conversation
…e-d permission When PR RocketChat#36217 refactored useReplyInDMAction, it introduced a regression. We previously checked for `!canCreateDM` (with a bang!) but that PR accidentally negated it to `canCreateDM`. Additionally, the conditional that includes `canCreateDM` was duplicated. DRY it out.
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
@tassoevan @juliajforesti Please comment |
There was a problem hiding this comment.
Hey @nmagedman ! Thanks for your contribution.
But I don't think the behavior is 100% yet - now even if I remove the permission to create dm from user role, Reply in direct message still appears, can you please verify?
Yes, @juliajforesti, you are correct; there are still problems with the logic for users without |
Proposed changes (including videos or screenshots)
When PR #36217 refactored useReplyInDMAction, it introduced a regression. We previously checked for
!canCreateDM(with a bang!) but that PR accidentally negated it tocanCreateDM.Additionally, the conditional that includes
canCreateDMwas duplicated. DRY it out.Steps to test or reproduce
create-dpermission. (By default, theuserrole does have this permission.)Expected Result:
The first menu item should be "Reply in direct message". Clicking that should create a new DM room.
Actual Result:
The "Reply in direct message" menu item is not shown.