diff options
author | Corey Hulen <corey@hulen.com> | 2017-08-03 05:38:17 -0700 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-08-03 08:38:17 -0400 |
commit | 43c523e8391f454c90358951c86b107d44203b72 (patch) | |
tree | b3707945221c24c78d19150cf28f742f5a736898 /app | |
parent | f3934bc7e1e8ef555e1c2e1fe0ece3dbd88ea687 (diff) | |
download | chat-43c523e8391f454c90358951c86b107d44203b72.tar.gz chat-43c523e8391f454c90358951c86b107d44203b72.tar.bz2 chat-43c523e8391f454c90358951c86b107d44203b72.zip |
PLT-7130 adding more generic push notificaiton message. (#7044)
* PLT-7130 adding more generic push notificaiton message.
* Fixing strings
Diffstat (limited to 'app')
-rw-r--r-- | app/notification.go | 9 |
1 files changed, 9 insertions, 0 deletions
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 |