mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 11:14:28 +00:00
Better Delete handling
This commit is contained in:
parent
3d3e9da800
commit
7b6982c959
1 changed files with 11 additions and 0 deletions
|
@ -305,6 +305,12 @@ class MicroblogPubBackend(Backend):
|
||||||
).get_object()
|
).get_object()
|
||||||
|
|
||||||
logger.info(f"inbox_delete handle_replies obj={obj!r}")
|
logger.info(f"inbox_delete handle_replies obj={obj!r}")
|
||||||
|
|
||||||
|
# Fake a Undo so any related Like/Announce doesn't appear on the web UI
|
||||||
|
DB.activities.update(
|
||||||
|
{"meta.object.id": obj.id},
|
||||||
|
{"$set": {"meta.undo": True, "meta.exta": "object deleted"}},
|
||||||
|
)
|
||||||
if obj:
|
if obj:
|
||||||
self._handle_replies_delete(as_actor, obj)
|
self._handle_replies_delete(as_actor, obj)
|
||||||
|
|
||||||
|
@ -325,6 +331,11 @@ class MicroblogPubBackend(Backend):
|
||||||
)["activity"]
|
)["activity"]
|
||||||
).get_object()
|
).get_object()
|
||||||
|
|
||||||
|
DB.activities.update(
|
||||||
|
{"meta.object.id": obj.id},
|
||||||
|
{"$set": {"meta.undo": True, "meta.exta": "object deleted"}},
|
||||||
|
)
|
||||||
|
|
||||||
self._handle_replies_delete(as_actor, obj)
|
self._handle_replies_delete(as_actor, obj)
|
||||||
|
|
||||||
@ensure_it_is_me
|
@ensure_it_is_me
|
||||||
|
|
Loading…
Reference in a new issue