From 43c523e8391f454c90358951c86b107d44203b72 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Thu, 3 Aug 2017 05:38:17 -0700 Subject: PLT-7130 adding more generic push notificaiton message. (#7044) * PLT-7130 adding more generic push notificaiton message. * Fixing strings --- app/notification.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/notification.go') diff --git a/app/notification.go b/app/notification.go index d145b21b3..d4af6463b 100644 --- a/app/notification.go +++ b/app/notification.go @@ -501,6 +501,15 @@ func sendPushNotification(post *model.Post, user *model.User, channel *model.Cha } else { msg.Message = senderName + userLocale("api.post.send_notifications_and_forget.push_in") + channelName + ": " + model.ClearMentionTags(post.Message) } + } else if *utils.Cfg.EmailSettings.PushNotificationContents == model.GENERIC_NO_CHANNEL_NOTIFICATION { + if channel.Type == model.CHANNEL_DIRECT { + msg.Category = model.CATEGORY_DM + msg.Message = senderName + userLocale("api.post.send_notifications_and_forget.push_message") + } else if wasMentioned || channel.Type == model.CHANNEL_GROUP { + msg.Message = senderName + userLocale("api.post.send_notifications_and_forget.push_mention_no_channel") + } else { + msg.Message = senderName + userLocale("api.post.send_notifications_and_forget.push_non_mention_no_channel") + } } else { if channel.Type == model.CHANNEL_DIRECT { msg.Category = model.CATEGORY_DM -- cgit v1.2.3-1-g7c22