[MM-47751][MM-48102] MPA: Send Persistent Notifications (#21619)
* MM-46410: adds urgency on mention counts We have introduced priority for posts in https://github.com/mattermost/mattermost-webapp/pull/10951. We do need to color the mention badges in the webapp with a prominent color when a mention is posted in an urgent message. A thread has urgent mentions if the root post is marked as urgent, and the replies contain mentions to the user viewing the thread. This PR adds two columns, urgentmentioncount, and isurgent, in channelmembers, and threads tables respectively. Furthermore when asking for team/thread mention counts, we also return urgent mention counts for the user. * Adds PostAcknowledgements table and apis * job init and fetch mentions * add-migrations * delete-expired * send-notifications * Fetches post priority in batches * stop-notifications * stop-notification-on-reply * MM-47750: Adds PostAcknowledgements table and apis - Adds post acknowledgement api/app/store methods to be able to save and delete post acknowledgements by users. - Adds wesbsocket events for acknowledgement created/deleted - Returns post acknowledgements in the post's metadata * add-license-check * add-pagination * delete on channel and team * validate guests * add configs * move create priority post check from app to api * Add desktop notifications * check status * use config in job * add IsUrgent check * Add last-sent-at * validate max recipients * Update lastSentAt * Validate min. recipient * send email notification only once * remove email notifications * use latest time from config to run job * Add notifications counter * publish events to mentioned users only * pickup license updates in scheduler * don't allow post owner to stop notifications * follow normal notifications behaviour * Validates persistent notifications interval * move logic of handling valid and expired posts into sql * Adds persistent notifications in the webapp --------- Co-authored-by: koox00 <3829551+koox00@users.noreply.github.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -2375,6 +2375,30 @@
|
||||
"id": "api.post.patch_post.can_not_update_post_in_deleted.error",
|
||||
"translation": "Can not update a post in a deleted channel."
|
||||
},
|
||||
{
|
||||
"id": "api.post.post_priority.max_recipients_persistent_notification_post.request_error",
|
||||
"translation": "Persistent notification post allows maximum of {{.MaxRecipients}} recipients."
|
||||
},
|
||||
{
|
||||
"id": "api.post.post_priority.min_recipients_persistent_notification_post.request_error",
|
||||
"translation": "Persistent notification post must have minimum 1 recipient."
|
||||
},
|
||||
{
|
||||
"id": "api.post.post_priority.persistent_notification_validation_error.request_error",
|
||||
"translation": "Persistent notification validation failed."
|
||||
},
|
||||
{
|
||||
"id": "api.post.post_priority.priority_post_not_allowed_for_user.request_error",
|
||||
"translation": "User is not allowed to create priority post or persistent notification."
|
||||
},
|
||||
{
|
||||
"id": "api.post.post_priority.priority_post_only_allowed_for_root_post.request_error",
|
||||
"translation": "Only root posts are allowed to have priority."
|
||||
},
|
||||
{
|
||||
"id": "api.post.post_priority.urgent_persistent_notification_post.request_error",
|
||||
"translation": "Persistent notification posts must have the Urgent Priority."
|
||||
},
|
||||
{
|
||||
"id": "api.post.posts_by_ids.invalid_body.request_error",
|
||||
"translation": "The number of Post IDs received has exceeded the maximum size of {{.MaxLength}}"
|
||||
@@ -6259,6 +6283,18 @@
|
||||
"id": "app.post.update.app_error",
|
||||
"translation": "Unable to update the Post."
|
||||
},
|
||||
{
|
||||
"id": "app.post_persistent_notification.delete_by_channel.app_error",
|
||||
"translation": "Unable to delete the persistent notifications by channel."
|
||||
},
|
||||
{
|
||||
"id": "app.post_persistent_notification.delete_by_team.app_error",
|
||||
"translation": "Unable to delete the persistent notifications by team."
|
||||
},
|
||||
{
|
||||
"id": "app.post_priority.delete_persistent_notification_post.app_error",
|
||||
"translation": "Failed to delete persistent notification post"
|
||||
},
|
||||
{
|
||||
"id": "app.post_prority.get_for_post.app_error",
|
||||
"translation": "Unable to get postpriority for post"
|
||||
@@ -8907,6 +8943,18 @@
|
||||
"id": "model.config.is_valid.password_length.app_error",
|
||||
"translation": "Minimum password length must be a whole number greater than or equal to {{.MinLength}} and less than or equal to {{.MaxLength}}."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.persistent_notifications_count.app_error",
|
||||
"translation": "Invalid total number of persistent notification per post. Must be a positive number."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.persistent_notifications_interval.app_error",
|
||||
"translation": "Invalid frequency of persistent notifications. Must be at least two minutes."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.persistent_notifications_recipients.app_error",
|
||||
"translation": "Invalid maximum number of recipients for persistent notifications. Must be a positive number."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.rate_mem.app_error",
|
||||
"translation": "Invalid memory store size for rate limit settings. Must be a positive number."
|
||||
|
||||
Ссылка в новой задаче
Block a user