Correct code style

pull/7569/head
Danilo Miranda 8 years ago
parent f426f36365
commit 43cd1794d0
  1. 4
      packages/rocketchat-ui-message/client/popup/messagePopup.js
  2. 4
      packages/rocketchat-ui/client/lib/chatMessages.js

@ -201,7 +201,9 @@ Template.messagePopup.onCreated(function() {
return;
}
firstPartValue = firstPartValue.replace(template.selectorRegex, template.prefix + getValue + template.suffix);
if (preColon) firstPartValue = preColon + firstPartValue
if (preColon) {
firstPartValue = preColon + firstPartValue;
}
template.input.value = firstPartValue + lastPartValue;
return setCursorPosition(template.input, firstPartValue.length);

@ -183,8 +183,8 @@ this.ChatMessages = class ChatMessages {
const msg = input.value;
const msgObject = { _id: Random.id(), rid, msg};
const lastMessage = ChatMessage.findOne({rid}, { fields: { ts: 1 }, sort: { ts: -1 }});
if(msg[0]+msg[1] === '+:'){
Meteor.call('setReaction', msg.replace('+','').trim(), lastMessage._id);
if (msg[0]+msg[1] === '+:') {
Meteor.call('setReaction', msg.replace('+', '').trim(), lastMessage._id);
input.value = '';
return;
}

Loading…
Cancel
Save