Files
mostlymatter/model
Kyriakos Z 36c8d1d1a0 MM-36862: removes participant from thread (#18795)
* MM-36862: removes participant from thread

Removing a participant upon last reply deleted from thread didn't work
reliably, a suspect on this is the replica lag, since we are first
deleting the post and then counting non-deleted posts of the participant
to decide on whether to delete or not.

The findings that led to this conclusion is that the reply count gets
updated but the participant is not removed (participant removal depends
on the number of replies this participant has in the thread.)

This commit fixes that by removing first the participant and then
deleting the post.
So we delete the participant if they have 1 post in that thread, and
then we delete the post, so now they have no posts in the thread.

* Makes deleting posts transactional

This commit makes deleting a post transactional and also tries to fix
permanent deletion of posts.

Currently when we permanently delete all posts by a user we don't update
the threads reply count nor the participant's array. This commit tries
to fix that.

* Adds comments on deleting posts

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-12-06 12:01:04 +02:00
..
2021-10-19 19:56:09 +05:30
2021-07-21 16:38:39 +02:00
2021-07-21 16:38:39 +02:00
2021-07-21 16:38:39 +02:00
2021-11-26 16:51:25 +01:00