Skip to content

rocketchat-channel-settings-mail-messages coffee to js#6541

Merged
engelgabriel merged 2 commits into
RocketChat:developfrom
ggazzo:rocketchat-channel-settings-mail-messages
Apr 3, 2017
Merged

rocketchat-channel-settings-mail-messages coffee to js#6541
engelgabriel merged 2 commits into
RocketChat:developfrom
ggazzo:rocketchat-channel-settings-mail-messages

Conversation

@ggazzo
Copy link
Copy Markdown
Member

@ggazzo ggazzo commented Mar 30, 2017

No description provided.

@ggazzo ggazzo changed the title rocketchat-channel-settings-mail-messages coffe to js rocketchat-channel-settings-mail-messages coffee to js Mar 30, 2017
@ggazzo ggazzo force-pushed the rocketchat-channel-settings-mail-messages branch 2 times, most recently from 00c0d64 to b284dfe Compare March 31, 2017 20:04
Copy link
Copy Markdown
Member

@rodrigok rodrigok left a comment

Choose a reason for hiding this comment

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

I'll continue the review after changes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why pass always true? Some places passes false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What do you think? const [el] = $('.messages-box');

@ggazzo ggazzo force-pushed the rocketchat-channel-settings-mail-messages branch 2 times, most recently from e18746b to d90b48d Compare March 31, 2017 21:07
@ggazzo ggazzo force-pushed the rocketchat-channel-settings-mail-messages branch from d90b48d to d66c833 Compare March 31, 2017 21:13
},
email() {
const {emails} = Meteor.user();
return emails && emails[0].address;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

emails can exists but be empty

const emails = t.$('input[name=to_emails]').val().trim().split(',');
const erroredEmails = [];
for (let j = 0, len = emails.length; j < len; j++) {
const email = emails[j];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

for (const email of emails) {

if (data.to_users.length > 0) {
_.each(data.to_users, (username) => {
const user = RocketChat.models.Users.findOneByUsername(username);
if (user && user.emails && user.emails[0].address) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

user.email can be empty

@rodrigok rodrigok added this to the 0.55.0 milestone Apr 3, 2017
@engelgabriel engelgabriel merged commit 92f67aa into RocketChat:develop Apr 3, 2017
@ggazzo ggazzo deleted the rocketchat-channel-settings-mail-messages branch April 3, 2017 19:37
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.

3 participants