diff options
author | Corey Hulen <corey@hulen.com> | 2017-06-16 11:22:12 -0700 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-06-16 14:22:12 -0400 |
commit | 64eb968b7d080645f96c489b034f31bb9ed70ba4 (patch) | |
tree | f6c5cea3797ea7a982fd0807a0b8842569877a3f /app | |
parent | 5158d3a44671f6faf2474b812987a7d301db7a2d (diff) | |
download | chat-64eb968b7d080645f96c489b034f31bb9ed70ba4.tar.gz chat-64eb968b7d080645f96c489b034f31bb9ed70ba4.tar.bz2 chat-64eb968b7d080645f96c489b034f31bb9ed70ba4.zip |
PLT-3901 send different push message when only images attached (#6672)
Diffstat (limited to 'app')
-rw-r--r-- | app/notification.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/notification.go b/app/notification.go index ae04288dd..7ddba0bdb 100644 --- a/app/notification.go +++ b/app/notification.go @@ -510,6 +510,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 + } + l4g.Debug("Sending push notification for user %v with msg of '%v'", user.Id, msg.Message) for _, session := range sessions { |