Allow posts to be deleted
Sometimes you might want to delete a post/reply. This is how a minimal delete activity looks like
stdClass Object
(
[@context] => https://www.w3.org/ns/activitystreams
[type] => Delete
[actor] => https://fed.brid.gy/realize.be
[id] => https://fed.brid.gy/realize.be?unique-id-needed-6
[to] => Array
(
[0] => https://www.w3.org/ns/activitystreams#Public
[1] => https://mastodon.social/users/swentel
)
[object] => stdClass Object
(
[id] => https://fed.brid.gy/realize.be?unique-id-needed-6
)
)
I posted to the shared inbox of mastodon.social in this case. Most of my test replies from yesterday are deleted now.
Not sure how to we'd tell bridgy that though since it works with sending webmentions.
right! bridgy fed users would trigger a delete by sending a webmention with a source URL that 410s: https://indieweb.org/deleted
aha, didn't know that was a valid response too .. :) I'll have to built this into the drupal module then, good to know!
It looks like it could be implemented by checking for a 410 source response in https://github.com/snarfed/bridgy-fed/blob/main/webmention.py#L43 and short-circuiting to sending deletion activities rather than looking for a h-entry and converting it to AS, after checking in the datastore to make sure that the thing we’re deleting is something we published in the first place.
^ started on this, but it's not quite easy. We store inboxes for every original post we deliver, but not responses (replies, likes, etc), and it takes work and extra requests to distinguish them.
In progress code is in the delete branch
Finally implemented this!