Skip to content

[FIX] open conversation from room info#11050

Merged
ggazzo merged 8 commits intodevelopfrom
open-conversation-from-user-info
Jun 13, 2018
Merged

[FIX] open conversation from room info#11050
ggazzo merged 8 commits intodevelopfrom
open-conversation-from-user-info

Conversation

@ggazzo
Copy link
Member

@ggazzo ggazzo commented Jun 7, 2018

Closes #11007

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11050 June 7, 2018 22:24 Inactive
@ggazzo ggazzo added this to the 0.66.0 milestone Jun 7, 2018
@ggazzo ggazzo requested a review from gdelavald June 7, 2018 22:25
@ggazzo ggazzo changed the title [FIX ] open conversation from room info [FIX] open conversation from room info Jun 10, 2018
@ggazzo ggazzo temporarily deployed to rocket-chat-pr-11050 June 10, 2018 19:12 Inactive
Copy link
Member

@sampaiodiego sampaiodiego Jun 10, 2018

Choose a reason for hiding this comment

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

what about describing what each conditions does assigning a new variable?

const whatThisDoes = (!directActions && rid && RocketChat.models.Subscriptions.findOne({ rid }).name !== username);
const whatThisDoesAsWell = (directActions && RocketChat.authz.hasAllPermission('create-d') && user && user.username !== username);

return username && whatThisDoes || whatThisDoesAsWell;

this will make the code easy to read and understand

@ggazzo ggazzo temporarily deployed to rocket-chat-pr-11050 June 12, 2018 00:04 Inactive
@ggazzo ggazzo temporarily deployed to rocket-chat-pr-11050 June 12, 2018 01:55 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11050 June 12, 2018 03:16 Inactive
gdelavald
gdelavald previously approved these changes Jun 12, 2018
@ggazzo ggazzo temporarily deployed to rocket-chat-pr-11050 June 12, 2018 21:28 Inactive
@ggazzo ggazzo temporarily deployed to rocket-chat-pr-11050 June 13, 2018 17:46 Inactive
@ggazzo ggazzo merged commit db0edc4 into develop Jun 13, 2018
@ggazzo ggazzo deleted the open-conversation-from-user-info branch June 13, 2018 22:12
@rodrigok rodrigok mentioned this pull request Jun 28, 2018
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.

Clicking a user mention on a direct message should enable you to open a new direct message with that user

4 participants

Comments