PLT-3901 send different push message when only images attached (#6672)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
5158d3a446
Коммит
64eb968b7d
@@ -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)
|
l4g.Debug("Sending push notification for user %v with msg of '%v'", user.Id, msg.Message)
|
||||||
|
|
||||||
for _, session := range sessions {
|
for _, session := range sessions {
|
||||||
|
|||||||
@@ -1643,6 +1643,10 @@
|
|||||||
"id": "api.post.send_notifications_and_forget.push_non_mention",
|
"id": "api.post.send_notifications_and_forget.push_non_mention",
|
||||||
"translation": " posted in "
|
"translation": " posted in "
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "api.post.send_notifications_and_forget.push_image_only",
|
||||||
|
"translation": " Uploaded one or more files "
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "api.post.send_notifications_and_forget.push_notification.error",
|
"id": "api.post.send_notifications_and_forget.push_notification.error",
|
||||||
"translation": "Failed to send push device_id={{.DeviceId}}, err={{.Error}}"
|
"translation": "Failed to send push device_id={{.DeviceId}}, err={{.Error}}"
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user