diff --git a/packages/rocketchat-lib/client/MessageAction.js b/packages/rocketchat-lib/client/MessageAction.js index 5dd9021a8b60..993cc6fe97c9 100644 --- a/packages/rocketchat-lib/client/MessageAction.js +++ b/packages/rocketchat-lib/client/MessageAction.js @@ -103,7 +103,13 @@ 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 } `; + const roomInfo = RocketChat.models.Rooms.findOne(message.rid, { fields: { t: 1 } }); + let text = `[ ](${ url }) `; + + if (roomInfo.t !== 'd' && message.u.username !== Meteor.user().username) { + text += `@${ message.u.username } `; + } + if (input.value) { input.value += input.value.endsWith(' ') ? '' : ' '; }