mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-3901 fixing push notificaiton with images message (#6783)
This commit is contained in:
committed by
Saturnino Abril
parent
2a96b7e15e
commit
9e600fcdcc
@@ -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)
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user