From 17c75e34d30bb9a07b3e9211f9debdf03495a951 Mon Sep 17 00:00:00 2001 From: Tim Kinnane Date: Fri, 5 Aug 2016 16:20:57 +1000 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20mention=20user=20in=20DM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rocketchat.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rocketchat.coffee b/src/rocketchat.coffee index 76c333992..12a06a683 100644 --- a/src/rocketchat.coffee +++ b/src/rocketchat.coffee @@ -190,7 +190,9 @@ class RocketChatBotAdapter extends Adapter reply: (envelope, strings...) => @robot.logger.info "reply" - strings = strings.map (s) -> "@#{envelope.user.name} #{s}" + isDM = envelope.room.indexOf(envelope.user.id) > -1 + unless isDM + strings = strings.map (s) -> "@#{envelope.user.name} #{s}" @send envelope, strings... callMethod: (method, args...) =>