bridgy-fed icon indicating copy to clipboard operation
bridgy-fed copied to clipboard

Allow posts to be deleted

Open swentel opened this issue 7 years ago • 2 comments

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.

swentel avatar Sep 27 '18 13:09 swentel

right! bridgy fed users would trigger a delete by sending a webmention with a source URL that 410s: https://indieweb.org/deleted

snarfed avatar Sep 27 '18 14:09 snarfed

aha, didn't know that was a valid response too .. :) I'll have to built this into the drupal module then, good to know!

swentel avatar Sep 27 '18 14:09 swentel

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.

barnabywalters avatar Nov 03 '22 15:11 barnabywalters

^ 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.

snarfed avatar Nov 05 '22 03:11 snarfed

In progress code is in the delete branch

snarfed avatar Nov 07 '22 00:11 snarfed

Finally implemented this!

snarfed avatar Apr 17 '23 22:04 snarfed