MM-38093: updates notifications copy on CRT replies (#18332)
MM-38093: updates notifications copy on CRT replies Updates texts form push and email notifications when the user has CRT "on" and the post is a reply to a thread. Email batches text aware of CRT threads Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
@@ -181,9 +181,19 @@ func (a *App) getPushNotificationMessage(contentsConfig, postMessage string, exp
|
||||
}
|
||||
|
||||
if channelType == model.ChannelTypeDirect {
|
||||
if replyToThreadType == model.CommentsNotifyCRT {
|
||||
if contentsConfig == model.GenericNoChannelNotification {
|
||||
return senderName + userLocale("api.post.send_notification_and_forget.push_comment_on_crt_thread")
|
||||
}
|
||||
return senderName + userLocale("api.post.send_notification_and_forget.push_comment_on_crt_thread_dm")
|
||||
}
|
||||
return userLocale("api.post.send_notifications_and_forget.push_message")
|
||||
}
|
||||
|
||||
if replyToThreadType == model.CommentsNotifyCRT {
|
||||
return senderName + userLocale("api.post.send_notification_and_forget.push_comment_on_crt_thread")
|
||||
}
|
||||
|
||||
if channelWideMention {
|
||||
return senderName + userLocale("api.post.send_notification_and_forget.push_channel_mention")
|
||||
}
|
||||
@@ -582,8 +592,16 @@ func (a *App) buildFullPushNotificationMessage(contentsConfig string, post *mode
|
||||
cfg := a.Config()
|
||||
if contentsConfig != model.GenericNoChannelNotification || channel.Type == model.ChannelTypeDirect {
|
||||
msg.ChannelName = channelName
|
||||
if a.isCRTEnabledForUser(user.Id) && post.RootId != "" {
|
||||
msg.ChannelName = userLocale("api.push_notification.title.collapsed_threads")
|
||||
}
|
||||
|
||||
if a.isCRTEnabledForUser(user.Id) && post.RootId != "" {
|
||||
if contentsConfig != model.GenericNoChannelNotification {
|
||||
props := map[string]interface{}{"channelName": channelName}
|
||||
msg.ChannelName = userLocale("api.push_notification.title.collapsed_threads", props)
|
||||
|
||||
if channel.Type == model.ChannelTypeDirect {
|
||||
msg.ChannelName = userLocale("api.push_notification.title.collapsed_threads_dm")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user