discourse-activity-pub icon indicating copy to clipboard operation
discourse-activity-pub copied to clipboard

FEATURE: Add actor deletion

Open angusmcleod opened this issue 8 months ago • 0 comments

@pmusaraj In the course of working on this I found it difficult to keep things straight without doing some structural changes.

Deletion changes

For the substantive changes in this PR, see these specs in particular:

  • spec/lib/discourse_activity_pub/ap/activity/delete_spec.rb
  • spec/lib/post_destroyer_spec.rb
  • spec/models/category_spec.rb
  • spec/models/tag_spec.rb
  • spec/requests/admin/discourse_activity_pub/actor_controller_spec.rb

For context on the approach to deletion, see further:

  • https://socialhub.activitypub.rocks/t/reconciling-activitypub-deletes-with-nodebb-deletion/4221/12?u=angus
  • https://codeberg.org/fediverse/fep/src/branch/main/fep/4f05/fep-4f05.md

Structural changes

The main structural changes in this PR are:

  • Move to zeitwerk loading.
  • Add a plugin.rb helper method for AP processing (activity_pub_on) to abstract that handling a bit.
  • Organise the modifications in plugin.rb into functional groups.

angusmcleod avatar May 12 '25 09:05 angusmcleod