1
0
mirror of https://git.sr.ht/~tsileo/microblog.pub synced 2025-06-05 21:59:23 +02:00

Add delete support for the outbox

This commit is contained in:
Thomas Sileo
2022-07-02 10:33:20 +02:00
parent d164d6d2dd
commit da048a9208
5 changed files with 62 additions and 1 deletions

View File

@ -99,8 +99,11 @@ def process_next_outgoing_activity(db: Session) -> bool:
next_activity.last_try = now()
payload = ap.wrap_object_if_needed(next_activity.outbox_object.ap_object)
if payload["type"] == "Create":
# Use LD sig if the activity may need to be forwarded by recipients
if payload["type"] in ["Create", "Delete"]:
ldsig.generate_signature(payload, k)
logger.info(f"{payload=}")
try:
resp = ap.post(next_activity.recipient, payload)