Fix outbox delete side effects

This commit is contained in:
Thomas Sileo 2022-08-30 20:05:10 +02:00
parent 8fe6cc9b9d
commit 6d933863d2
5 changed files with 127 additions and 5 deletions

View file

@ -84,12 +84,13 @@ def build_move_activity(
def build_note_object(
from_remote_actor: actor.RemoteActor,
from_remote_actor: actor.RemoteActor | models.Actor,
outbox_public_id: str | None = None,
content: str = "Hello",
to: list[str] = None,
cc: list[str] = None,
tags: list[ap.RawObject] = None,
in_reply_to: str | None = None,
) -> ap.RawObject:
published = now().replace(microsecond=0).isoformat().replace("+00:00", "Z")
context = from_remote_actor.ap_id + "/ctx/" + uuid4().hex
@ -108,8 +109,8 @@ def build_note_object(
"url": from_remote_actor.ap_id + "/note/" + note_id,
"tag": tags or [],
"summary": None,
"inReplyTo": None,
"sensitive": False,
"inReplyTo": in_reply_to,
}