mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
Fix reply delete from inbox
This commit is contained in:
parent
d3f2d61daf
commit
4f0812988b
1 changed files with 7 additions and 1 deletions
|
@ -52,7 +52,13 @@ def _delete_process_inbox(delete: ap.Delete, new_meta: _NewMeta) -> None:
|
|||
)
|
||||
)
|
||||
if in_reply_to:
|
||||
DB.activities.update_one(post_query, inc(MetaKey.COUNT_REPLY, -1))
|
||||
DB.activities.update_one(
|
||||
{**by_object_id(in_reply_to), **by_type(ap.ActivityType.CREATE)},
|
||||
inc(MetaKey.COUNT_REPLY, -1),
|
||||
)
|
||||
DB.replies.update_one(
|
||||
by_remote_id(in_reply_to), inc(MetaKey.COUNT_REPLY, -1)
|
||||
)
|
||||
except Exception:
|
||||
_logger.exception(f"failed to handle delete replies for {obj_id}")
|
||||
|
||||
|
|
Loading…
Reference in a new issue