[Fix] Don't @ mention when doing reply in DM

pull/7347/head
Aaron Ogle 9 years ago
parent b34e081123
commit 3daf5207c8
No known key found for this signature in database
GPG Key ID: 9DE7F8BEE517326A
  1. 7
      packages/rocketchat-lib/client/MessageAction.js

@ -103,7 +103,12 @@ Meteor.startup(function() {
const message = this._arguments[1];
const input = instance.find('.input-message');
const url = RocketChat.MessageAction.getPermaLink(message._id);
const text = `[ ](${ url }) @${ message.u.username } `;
let text = `[ ](${ url }) `;
if (Session.get('openedRoom').indexOf(Meteor.userId()) === -1) {
text += `@${ message.u.username }`
}
if (input.value) {
input.value += input.value.endsWith(' ') ? '' : ' ';
}

Loading…
Cancel
Save