Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

Deleting a post vs deleting an entire comment tree

Technical Discussion
23 11 0
  • @thisismissem not even orphaned, a delete leaves behind a tombstone object which should still be dereferenceable from anywhere else.

  • @julian @rimu @nutomic @melroy @BentiGorlich

    I'm still confused that so many people have thought that using Announce as a solution for something which is at its core, an addressing problem is a good way to do it.

    I guess I might not be aware of some subtleties, but why doesn't the original Delete reach all the interested parties? Why is there a need for Announce-ing it in the first place?

  • @julian @rimu @nutomic @melroy @BentiGorlich

    I'm still confused that so many people have thought that using Announce as a solution for something which is at its core, an addressing problem is a good way to do it.

    I guess I might not be aware of some subtleties, but why doesn't the original Delete reach all the interested parties? Why is there a need for Announce-ing it in the first place?

    Lets say you have a user on instance alpha, and a community on instance beta, with followers on various other instances. The user makes a post in the community, but how can he know who the community followers are to send it directly to them? And how could the followers trust that an activity sent directly was actually approved by the community?

    Another solution for this would be inbox forwarding, but by now its too late to change the behaviour of all existing platforms.

  • If that object is the root-level node, and it is deleted, everything below it is also deleted.

    This is not exactly true. When Lemmy receives Delete/Object for a (top level) post, it only marks the post itself as deleted. The replies are not marked as deleted in the database, but are (currently) hidden in the UI. For 1.0 this behaviour is already changed in the API and UI so that deleted posts are removed from listings, but accessible by direct link so that comments can be viewed. This doesnt involve any change to federation and is an implementation detail.

    Adding a new activity type for each such implementation detail is not feasible, and we cannot support all of them. So to maximize compatibility you should definitely keep using Delete(Object), and add a new property if you need to be explicit about it.

  • I've got a PR for removing an entire comment thread for Lemmy mostly ready, I just need to write the tests and decide on how this exact problem should work, so the timing is honestly impeccable. The things I've been debating between are:

    1. Same as option 1, a new property like removeChildren;
    2. 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;
    3. 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 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.

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

    @nutomic > Make the target of the Delete an array

    It technically is because of JSON-LD (everything can be an array), however, software may not support it because it's pretty common for devs to treat AP as JSON instead of JSON-LD, so doing an assessment of compatibility would be suggested

  • @tofeo  :verified: @julian ...where "always" means "since before there was even Mastodon".

    A side-effect of their model, present at least on Hubzilla and Hubzilla's descendants, including still existing (streams) and Forte, is that comments/replies cannot exist in a stream without a) a parent and b) a start post. On all of them, including Friendica, it isn't a post if it replies to something, very much unlike Mastodon where a thread is a bunch of posts.

    Depending on whom you ask, a conversation looks either like this:
    • Post
      • Comment
        • Comment
          • Comment
      • Comment
        • Comment
          • Comment
    or like this:
  • Lets say you have a user on instance alpha, and a community on instance beta, with followers on various other instances. The user makes a post in the community, but how can he know who the community followers are to send it directly to them? And how could the followers trust that an activity sent directly was actually approved by the community?

    Another solution for this would be inbox forwarding, but by now its too late to change the behaviour of all existing platforms.

    @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

  • @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

    @nutomic I realize this explanation probably skips a lot of information that's clear to me from my context, but I'll try to answer if anyone has any questions.

  • @thisismissem not even orphaned, a delete leaves behind a tombstone object which should still be dereferenceable from anywhere else.

    mariusor@metalhead.club that works too!

  • thisismissem seems I misspoke, as Nutomic's reply above clarifies: the tree stays but is effectively orphaned. Lemmy v1.0 will allow the reply tree to be accessed post-deletion.

    The original query does still remain the same: what would be the best way forward to explicitly signal the deletion (or technically, the removal) of an entire reply tree?

    cc jdp23@neuromatch.social mariusor@metalhead.club

  • @julian @jdp23 well, a Delete can be operated on an array of objects. :D

    Send one with all the objects that are affected from the local instance (and probably you must keep in mind that not all replies might be).

  • 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 Remove

    I 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 the context of Object to figure that out. Anyway the instance where the Group is 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.


Gli ultimi otto messaggi ricevuti dalla Federazione
  • I fail to see what the fundamental difference is. If you are unsure about the target with Delete/Object, you can also resolve the context of Object to figure that out. Anyway the instance where the Group is 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.

    read more

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

    read more

  • 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 Remove

    I will of course concede that it is more work to deliver Remove.

    cc thisismissem

    read more

  • @julian @jdp23 well, a Delete can be operated on an array of objects. :D

    Send one with all the objects that are affected from the local instance (and probably you must keep in mind that not all replies might be).

    read more

  • thisismissem seems I misspoke, as Nutomic's reply above clarifies: the tree stays but is effectively orphaned. Lemmy v1.0 will allow the reply tree to be accessed post-deletion.

    The original query does still remain the same: what would be the best way forward to explicitly signal the deletion (or technically, the removal) of an entire reply tree?

    cc jdp23@neuromatch.social mariusor@metalhead.club

    read more

  • mariusor@metalhead.club that works too!

    read more

  • Thanks! I will do just that... mostly since I don't feel like hosting my own context just for this one property.

    This feature is now implemented and should ship with the next minor version of NodeBB — v4.8.0.

    read more

  • @nutomic I realize this explanation probably skips a lot of information that's clear to me from my context, but I'll try to answer if anyone has any questions.

    read more
Post suggeriti
  • 0 Votes
    1 Posts
    8 Views
    Week in Fediverse 2025-11-28Servers- tootik v0.20.0- Ktistec v3.2.1- NodeBB v4.7.0- Wafrn v2025.11.01- Loops v1.0.0-beta.5- Mitra v4.14.0- Misskey v2025.11.1- Omnom v0.8.0- PieFed v1.3.5- stegodon: An SSH-first federated blogging platform- linkblocks: A federated network to bookmark, share and discuss good web pages with your friendsClients- Chihu v1.14.0- Phanpy changelogTools and Plugins- feed2fedi v3.4.0- FIRES Server v0.7.0- OwncastLive Panel: A GNOME Shell extension that monitors your favorite Owncast instances and notifies you when they go liveArticles- Git as Federation Transport — Rethinking How Small Social Networks Talk to Each Other- Now witness the power of this fully operational Fediverse!- Fediverse onboarding resources- Owncast Newsletter November 2025- Fediverse Report – #144-----#WeekInFediverse #Fediverse #ActivityPubPrevious edition: https://mitra.social/objects/019aa829-83b6-d369-eedb-8725125ced7b
  • 1 Votes
    1 Posts
    9 Views
    I've been here for years and I still haven't cracked the Fediverse code.On Twitter I could post "eating cereal" and get 50 bot likes + one crypto bro following me. Here I can post a 30-second video of my cat trying to fight the vacuum cleaner with the caption "me when someone's instance federates with threads dot net" and… absolute silence. Not even a sympathy boost from the admin who literally pays for the server I'm yelling on 😭So please, someone finally explain the secret sauce: Do I need to switch my cat to a vegan gluten-free diet? Do I have to mention systemd negatively in every post? Or is the real trick sacrificing a Raspberry Pi to the old gods of ActivityPub?? #Fediverse #Mastodon #CatsOfMastodon #ActivityPub #SystemdHateClub #PleaseBoostImBeggingYou
  • 0 Votes
    1 Posts
    14 Views
    Release v2.4.16 of Ktistec... because I forgot to include some critical code in v2.4.15... namely, the menu.ChangedReorganize the admin menu.If you're not planning on adding additional users, you don't need to update!#ktistec #fediverse #activitypub #crystallang
  • 0 Votes
    14 Posts
    102 Views
    @julian doooooo iiiiiiit