summaryrefslogtreecommitdiffstats
path: root/app/notification.go
diff options
context:
space:
mode:
authorSudheer <sudheer.105@gmail.com>2018-08-30 16:37:36 +0530
committerJesús Espino <jespinog@gmail.com>2018-08-30 13:07:36 +0200
commit570c52b4cc88d7d0864511b9a4cb6318a07a6dbb (patch)
treefb1dd3ba00573d3aa82e220834f317c5d633a8be /app/notification.go
parenteffa9d33fcbbab27f69a4c59356a84f925d41baf (diff)
downloadchat-570c52b4cc88d7d0864511b9a4cb6318a07a6dbb.tar.gz
chat-570c52b4cc88d7d0864511b9a4cb6318a07a6dbb.tar.bz2
chat-570c52b4cc88d7d0864511b9a4cb6318a07a6dbb.zip
MM-11710 Add a check to webhook messages to populate username from DM channel for email subject (#9314)
Diffstat (limited to 'app/notification.go')
-rw-r--r--app/notification.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/notification.go b/app/notification.go
index 70f60dd42..910748cd3 100644
--- a/app/notification.go
+++ b/app/notification.go
@@ -163,7 +163,7 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
if post.IsSystemMessage() {
senderName = utils.T("system.message.name")
} else {
- if value, ok := post.Props["override_username"]; ok && post.Props["from_webhook"] == "true" {
+ if value, ok := post.Props["override_username"]; ok && post.Props["from_webhook"] == "true" && channel.Type != model.CHANNEL_DIRECT {
senderName = value.(string)
senderUsername = value.(string)
} else {