Context deletion vs. Removal brainstorming
-
Currently I am grappling with the specifics behind how to federate out the deletion of a topic in a category (or in ForumWG terms, the deletion of a context from an audience.)
For those unaware, a context is essentially an OrderedCollection containing all objects within its purview.
Deleting a note or other object is easy. If you are same-origin as the object, you
Delete(Object)
, done.Deleting a context is more difficult... you can't rely on other implementors to store references to your contexts, since it is essentially meaningless to them. Furthermore, if a context is deleted, then when a
Delete(Context)
is federated out, receivers will have no idea what they're seeing, will try to retrieve the object, and find a 404. So it doesn't even work at all.Even worse, you can't really delete other peoples' contexts (or for that matter, their content) since you're not same-origin.
Finally, I realized I'm looking at this the wrong way — I'm not deleting contexts, I'm simply removing them from an audience.
Remove
works perfectly fine when the context continues to exist (as it can be referenced and duck typed).Remove
also works for remote content; the same-origin check applies to the audience you're removing from.If you're deleting a context, you have to be the same-origin, and you really should just federate out deletion of the local members in that collection, via regular
Delete(Object)
.I suppose federating out self-destruction of a context would be the most complete but it is quite difficult to do when it is no longer resolvable...
-
undefined NodeBB shared this topic
-
@julian I forgot, why do you want to delete a context? If it's your thread, isn't it enough to just
Delete
the top-level post?