Fix Delete side effects
This commit is contained in:
parent
c383259296
commit
a8e9b5498a
1 changed files with 9 additions and 7 deletions
|
@ -241,12 +241,14 @@ class MicroblogPubBackend(Backend):
|
||||||
)
|
)
|
||||||
obj = delete.get_object()
|
obj = delete.get_object()
|
||||||
if obj.ACTIVITY_TYPE != ap.ActivityType.NOTE:
|
if obj.ACTIVITY_TYPE != ap.ActivityType.NOTE:
|
||||||
obj = DB.inbox.find_one(
|
obj = ap.parse_activity(
|
||||||
|
DB.inbox.find_one(
|
||||||
{
|
{
|
||||||
"activity.object.id": delete.get_object().id,
|
"activity.object.id": delete.get_object().id,
|
||||||
"type": ap.ActivityType.CREATE.value,
|
"type": ap.ActivityType.CREATE.value,
|
||||||
}
|
}
|
||||||
)
|
)["activity"]
|
||||||
|
).get_object()
|
||||||
|
|
||||||
logger.info(f"inbox_delete handle_replies obj={obj!r}")
|
logger.info(f"inbox_delete handle_replies obj={obj!r}")
|
||||||
if obj:
|
if obj:
|
||||||
|
@ -273,7 +275,7 @@ class MicroblogPubBackend(Backend):
|
||||||
"activity.object.id": delete.get_object().id,
|
"activity.object.id": delete.get_object().id,
|
||||||
"type": ap.ActivityType.CREATE.value,
|
"type": ap.ActivityType.CREATE.value,
|
||||||
}
|
}
|
||||||
)
|
)["activity"]
|
||||||
).get_object()
|
).get_object()
|
||||||
|
|
||||||
self._handle_replies_delete(as_actor, obj)
|
self._handle_replies_delete(as_actor, obj)
|
||||||
|
|
Loading…
Reference in a new issue