w3c / activitypub

http://w3c.github.io/activitypub/
Other
1.22k stars 78 forks source link

Clarify 'Delete' activity re unwinding side effects #472

Open dmitrizagidulin opened 3 weeks ago

dmitrizagidulin commented 3 weeks ago

(Big thanks to @hrefna for raising this issue). To quote/paraphrase:

Many Activities in AP have complicated (and sometimes recursive) side effects. The specs (and Best Practices docs) on the Delete activity need to address how Delete interacts with unwinding side effects. For example:

evanp commented 2 weeks ago

So, I think this is a really good issue. I have a few thoughts on the topic.

First, I don't think the concern about side effects is quite as severe for content types like Note, Image, Video, etc. This is pretty well-worn territory, covered in the spec, and the side effects are mainly about distributing to collections like replies.

The second issue is that I don't think deleting the activity is the preferred way to undo its side effects; they would normally be handled with an Undo. I think the Postel guideline for this is to say that publishers MUST use Undo or the inverse activity to undo an activity, not Delete, and that consumers MAY treat a Delete as if it were an Undo.

evanp commented 2 weeks ago

I'll take the rest in order, but I think these should probably go to the Primer.

If you Delete{Object} what happens to Create for that object?

Nothing. It remains how it is.

What happens to the posts/likes/follows/etc if you Delete{Actor}?

Great question! I think a best practice by the server that hosts the actor object is to send out undos for all the relevant actions (Undo Follow, Undo Like, ...). It could even send out Delete's for created object, Undo's for Announce activities, etc.

That said, it's a real big lift, and I don't think anyone does this right now.

If I Delete my actor's inbox—and just the inbox—what should I expect to happen?

With the API, your server should reject it.

If hashtags are defined as Links, that means I can't delete a Hashtag?

Yeah, I don't think it's even meaningful to talk about deleting a hashtag. It's kind of a global numinous object that nobody owns; it's like deleting an idea or a category.

Note1 has an inbox and allows follow relationships so that people can follow the Note. What happens when someone Deletes it?

It works the same as deleting any other actor.

I'm going to try capturing some of these ideas to the Primer.

evanp commented 2 weeks ago

We think that at least the question of deleting an actor should be addressed in the main spec.

evanp commented 2 weeks ago

Bob Wyman points out that for many applications, deleting an actor is overkill, and would be really deleterious to the fabric network. For example, in a marketplace application, it would be a real big problem if the seller in a transaction deleted their account.