Deleting a post vs deleting an entire comment tree
-
This is slightly different from OP as you are talking about deleting a reply (ie
Note) with children, while OP is about deleting a top-level post with children. Nevertheless both can be represented in the same way over federation.Just sending out an individual Delete for every Object. I like this option the least, but it is very easy to implement and needs no changes in other software to work.
This would be terrible for performance when removing dozens or hundreds of comments at once. Rule of thumb should be one activity for one user action.
Make the target of the Delete an array. I’m honestly 50/50 on whether this is actually spec compliant, it’s not clear to me that it isn’t;
The problem with this is that some platforms might get the idea to delete multiple unrelated comments with a single activity, or even comments in different posts. Handling that would make the receiving logic unnecessarily complicated, and would also make it complicated to combine the modlog entries.
Same as option 1, a new property like removeChildren;
This is the simplest and best option.
I do agree that
with_replies, or similar, would be the easiest approach, but I don't think it is the most specific.The bool suggests that all replies to a given object are deleted. However, you do not know whether your idea of what the reply tree is matches that of the originating server (which replies are included, etc.?)
Remove(Context), on the other hand does imply both that the container is deleted, and all of its replies, which are dereferenceable by resolving the context directly. It also has the benefit of being able to provide a pointer to where it was removed from, which is useful.So to me it's not just a matter of preference, but that there are additional benefits to
RemoveI will of course concede that it is more work to deliver
Remove.cc thisismissem
-
@nutomic I solved this by having an the instance be an actor that is an intermediary for all operations. All activities get CC'ed to the followers of the user actor, and of the instance actor. (replace instance with community/group, whatever you use as an aggregate element for your implementation)
This should cover all interested parties imho.
The potential downside is that instances need to explicitly operate between themselves with follow operations (which conveniently also solves the problem of unwanted interactions with less savory corners of the fediverse).
Like I said, a problem of addressing. :P
I'm sure that approach works as well. This would have been worth discussing 4 or 5 years ago when I was just implementing federation in Lemmy for the first time. By now FEP-1b12 is already an established standard which is used by various platforms, and it would be completely unfeasible to replace it with something else.
-
I fail to see what the fundamental difference is. If you are unsure about the target with
Delete/Object, you can also resolve thecontextof Object to figure that out. Anyway the instance where theGroupis hosted is always the authority, so the state there is the correct one.Actually I would rather think of this from a different perspective, namely from the perspective of the mod who clicks the remove button. That would happen when a post is offtopic or violates the rules, and then the intent clearly is to remove all replies as they are not useful. It wouldnt make sense to leave up a single reply two levels deep just because it wasnt included in the context for some reason.
-
@julian This sounds like an implementation detail to me. Some fedi platforms delete a child object when its parent is deleted, others don't.
If you want to make the removal of a subtree explicit, I'd recommend a
Removewhereobjectis an array (similar to what @mariusor suggested):Remove(object: Note[], target: Context)This also helps with migrating away from
Announce(Delete). I saw your FEP draft, will provide more feedback once I read it in full. -
I'm sure that approach works as well. This would have been worth discussing 4 or 5 years ago when I was just implementing federation in Lemmy for the first time. By now FEP-1b12 is already an established standard which is used by various platforms, and it would be completely unfeasible to replace it with something else.
@nutomic if you're implying that I should have spoken sooner, I'm pretty sure I did. I remember exchanging messages with both you and @dessalines when you started lemmy...
I have no specific memory about this topic, but to my recollection lemmy federation was pushed as fait-accomplit at one point without me seeing any previous research on your guys part.