PLT-4179 send push notifications with override_username (#4040)

Этот коммит содержится в:
enahum
2016-09-20 13:01:12 -03:00
коммит произвёл Christopher Speller
родитель f8108efe35
Коммит 4e3d465210

Просмотреть файл

@@ -678,7 +678,11 @@ func sendNotifications(c *Context, post *model.Post, team *model.Team, channel *
if post.IsSystemMessage() {
senderName = c.T("system.message.name")
} else if profile, ok := profileMap[post.UserId]; ok {
senderName = profile.Username
if value, ok := post.Props["override_username"]; ok && post.Props["from_webhook"] == "true" {
senderName = value.(string)
} else {
senderName = profile.Username
}
sender = profile
}