[MM-45802] Clear CRT notification on deleted reply (#23568)
* reduce the counter on post deletion * add test * change translations * fix collecting mentions for DMs * add translation texts * extract logic for getting mentions * send WS event * add e2e tests * tidy mod * WIP * Deleting notification async * Fixed a unit test * Added more tests * Updated i18n * CI * mattermost-server -> mattermost * mattermost-server -> mattermost --------- Co-authored-by: Konstantinos Pittas <konstantinos.pittas@mattermost.com> Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b6b561a8f1
Коммит
412109b02e
@@ -1338,6 +1338,12 @@ func (a *App) DeletePost(c request.CTX, postID, deleteByID string) (*model.Post,
|
||||
a.deleteFlaggedPosts(post.Id)
|
||||
})
|
||||
|
||||
a.Srv().Go(func() {
|
||||
if err = a.RemoveNotifications(c, post, channel); err != nil {
|
||||
a.Log().Error("DeletePost failed to delete notification", mlog.Err(err))
|
||||
}
|
||||
})
|
||||
|
||||
a.invalidateCacheForChannelPosts(post.ChannelId)
|
||||
|
||||
return post, nil
|
||||
|
||||
Ссылка в новой задаче
Block a user