|
|
|
|
@ -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(' ') ? '' : ' '; |
|
|
|
|
} |
|
|
|
|
|