Browse Source

Reformat

pull/38/head
Dashie der otter 2 months ago
parent
commit
5a393bba6d
Signed by: Dashie <dashie@sigpipe.me> GPG Key ID: C2D57B325840B755
2 changed files with 4 additions and 4 deletions
  1. 1
    3
      activitypub/backend.py
  2. 3
    1
      tasks.py

+ 1
- 3
activitypub/backend.py View File

@@ -192,9 +192,7 @@ class Reel2BitsBackend(ap.Backend):
# FIXME do that better
activity_uri = activity.get_object_id().rstrip("/activity")
current_app.logger.debug(f"id: {activity_uri}")
orig_activity = Activity.query.filter(
Activity.url == activity_uri, Activity.type == "Create"
).first()
orig_activity = Activity.query.filter(Activity.url == activity_uri, Activity.type == "Create").first()
orig_activity.meta_deleted = True
db.session.commit()


+ 3
- 1
tasks.py View File

@@ -58,7 +58,9 @@ def federate_delete_sound(sound: Sound) -> None:
# Create delete
# Somehow we needs to add /activity here
# FIXME do that better
delete = ap.Delete(actor=actor, object=ap.Tombstone(id=sound.activity.payload['id'] + '/activity').to_dict(embed=True))
delete = ap.Delete(
actor=actor, object=ap.Tombstone(id=sound.activity.payload["id"] + "/activity").to_dict(embed=True)
)
# Federate
post_to_outbox(delete)


Loading…
Cancel
Save