From 570c52b4cc88d7d0864511b9a4cb6318a07a6dbb Mon Sep 17 00:00:00 2001 From: Sudheer Date: Thu, 30 Aug 2018 16:37:36 +0530 Subject: MM-11710 Add a check to webhook messages to populate username from DM channel for email subject (#9314) --- app/notification.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/notification.go') 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 { -- cgit v1.2.3-1-g7c22