diff options
author | Corey Hulen <corey@hulen.com> | 2017-06-28 20:05:34 -0700 |
---|---|---|
committer | Saturnino Abril <saturnino.abril@gmail.com> | 2017-06-29 11:05:34 +0800 |
commit | 9e600fcdccabfc55b85c026eda5eedab5bc91152 (patch) | |
tree | 5eeef8f2bf720d9919c3241cbe90f60c3f69712c | |
parent | 2a96b7e15ea0a6da2d5397140aff9478945d8828 (diff) | |
download | chat-9e600fcdccabfc55b85c026eda5eedab5bc91152.tar.gz chat-9e600fcdccabfc55b85c026eda5eedab5bc91152.tar.bz2 chat-9e600fcdccabfc55b85c026eda5eedab5bc91152.zip |
PLT-3901 fixing push notificaiton with images message (#6783)
-rw-r--r-- | app/notification.go | 6 | ||||
-rw-r--r-- | i18n/en.json | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/app/notification.go b/app/notification.go index 2b9c9bcff..d2eb44b3a 100644 --- a/app/notification.go +++ b/app/notification.go @@ -515,7 +515,11 @@ func sendPushNotification(post *model.Post, user *model.User, channel *model.Cha // If the post only has images then push an appropriate message if len(post.Message) == 0 && post.FileIds != nil && len(post.FileIds) > 0 { - msg.Message = senderName + userLocale("api.post.send_notifications_and_forget.push_image_only") + channelName + if channel.Type == model.CHANNEL_DIRECT { + msg.Message = senderName + userLocale("api.post.send_notifications_and_forget.push_image_only_dm") + } else { + msg.Message = senderName + userLocale("api.post.send_notifications_and_forget.push_image_only") + channelName + } } l4g.Debug("Sending push notification for user %v with msg of '%v'", user.Id, msg.Message) diff --git a/i18n/en.json b/i18n/en.json index 9db609422..38273bfe4 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1645,7 +1645,11 @@ }, { "id": "api.post.send_notifications_and_forget.push_image_only", - "translation": " Uploaded one or more files " + "translation": " Uploaded one or more files in " + }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_dm", + "translation": " Uploaded one or more files in a direct message" }, { "id": "api.post.send_notifications_and_forget.push_in", |