Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
We Distribute
  1. Home
  2. Technical Discussion
  3. Deleting a post vs deleting an entire comment tree

Deleting a post vs deleting an entire comment tree

Scheduled Pinned Locked Moved Technical Discussion
deletionthreadiverseactivitypub
66 Posts 15 Posters 41 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • tofeo@mstdn.socialT This user is from outside of this forum
    tofeo@mstdn.socialT This user is from outside of this forum
    tofeo@mstdn.social
    wrote on last edited by
    #7

    @julian @rimu @nutomic @melroy @BentiGorlich

    #hubzilla and #friendica had always have the discussion tree

    jupiter_rowland@hub.netzgemeinde.euJ 1 Reply Last reply
    0
    • helge@mymath.rocksH This user is from outside of this forum
      helge@mymath.rocksH This user is from outside of this forum
      helge@mymath.rocks
      wrote on last edited by
      #8

      Can you clarify a bit what this means?

      I'm imaging the following scenario, i.e. Given gherkin steps,

      • Alice on her own server Abel.
      • Bob on the forum server Forum.
      • Alice created a post in a category of Forum. Let's call it "1000 reasons to hug cows". id http://abel.example/alice/post.
      • Bob, a million other trolls, replies with "To tip them over! lol!". Bob's post has id http://forum.example/bob/post/id.

      The When block is simple. Alice deletes her post, it's a root post (with lots of stupid replies). This means a Delete activity is send for the object with http://abel.example/alice/post.

      Now, what does this imply? Obviously, we have "The forum sends an Announce(Delete).". But do we also have:

      • The forum sends a Delete(http://forum.example/bob/post/id) as Bob?
      • The forum sends a Announce(Delete(http://forum.example/bob/post/id)) as the forum?

      How does the forum handle posts not made by its users? It obviously cannot delete them! So is there like an Undo(Announce(Create(Object))) or a Remove(Object)?

      1 Reply Last reply
      0
      • mariusor@metalhead.clubM This user is from outside of this forum
        mariusor@metalhead.clubM This user is from outside of this forum
        mariusor@metalhead.club
        wrote on last edited by
        #9

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

        thisismissem@activitypub.spaceT 1 Reply Last reply
        1
        • mariusor@metalhead.clubM This user is from outside of this forum
          mariusor@metalhead.clubM This user is from outside of this forum
          mariusor@metalhead.club
          wrote on last edited by
          #10

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

          nutomic@lemmy.mlN 1 Reply Last reply
          0
          • mariusor@metalhead.clubM mariusor@metalhead.club

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

            nutomic@lemmy.mlN This user is from outside of this forum
            nutomic@lemmy.mlN This user is from outside of this forum
            nutomic@lemmy.ml
            wrote on last edited by
            #11

            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.

            mariusor@metalhead.clubM 1 Reply Last reply
            0
            • nutomic@lemmy.mlN This user is from outside of this forum
              nutomic@lemmy.mlN This user is from outside of this forum
              nutomic@lemmy.ml
              wrote on last edited by
              #12

              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.

              1 Reply Last reply
              1
              • flamingos@feddit.ukF flamingos@feddit.uk

                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.
                nutomic@lemmy.mlN This user is from outside of this forum
                nutomic@lemmy.mlN This user is from outside of this forum
                nutomic@lemmy.ml
                wrote on last edited by
                #13

                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.

                thisismissem@hachyderm.ioT julian@activitypub.spaceJ 2 Replies Last reply
                0
                • nutomic@lemmy.mlN nutomic@lemmy.ml

                  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.

                  thisismissem@hachyderm.ioT This user is from outside of this forum
                  thisismissem@hachyderm.ioT This user is from outside of this forum
                  thisismissem@hachyderm.io
                  wrote on last edited by
                  #14

                  @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

                  trwnh@mastodon.socialT 1 Reply Last reply
                  1
                  • tofeo@mstdn.socialT tofeo@mstdn.social

                    @julian @rimu @nutomic @melroy @BentiGorlich

                    #hubzilla and #friendica had always have the discussion tree

                    jupiter_rowland@hub.netzgemeinde.euJ This user is from outside of this forum
                    jupiter_rowland@hub.netzgemeinde.euJ This user is from outside of this forum
                    jupiter_rowland@hub.netzgemeinde.eu
                    wrote on last edited by
                    #15
                    @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:
                    1 Reply Last reply
                    0
                    • nutomic@lemmy.mlN nutomic@lemmy.ml

                      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.

                      mariusor@metalhead.clubM This user is from outside of this forum
                      mariusor@metalhead.clubM This user is from outside of this forum
                      mariusor@metalhead.club
                      wrote on last edited by
                      #16

                      @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. 😛

                      mariusor@metalhead.clubM nutomic@lemmy.mlN 2 Replies Last reply
                      0
                      • mariusor@metalhead.clubM mariusor@metalhead.club

                        @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. 😛

                        mariusor@metalhead.clubM This user is from outside of this forum
                        mariusor@metalhead.clubM This user is from outside of this forum
                        mariusor@metalhead.club
                        wrote on last edited by
                        #17

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

                        1 Reply Last reply
                        0
                        • mariusor@metalhead.clubM mariusor@metalhead.club

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

                          thisismissem@activitypub.spaceT This user is from outside of this forum
                          thisismissem@activitypub.spaceT This user is from outside of this forum
                          thisismissem@activitypub.space
                          wrote on last edited by
                          #18

                          mariusor@metalhead.club that works too!

                          1 Reply Last reply
                          0
                          • julian@activitypub.spaceJ This user is from outside of this forum
                            julian@activitypub.spaceJ This user is from outside of this forum
                            julian@activitypub.space
                            wrote on last edited by
                            #19

                            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

                            1 Reply Last reply
                            0
                            • mariusor@metalhead.clubM This user is from outside of this forum
                              mariusor@metalhead.clubM This user is from outside of this forum
                              mariusor@metalhead.club
                              wrote on last edited by
                              #20

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

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

                              julian@activitypub.spaceJ 1 Reply Last reply
                              0
                              • nutomic@lemmy.mlN nutomic@lemmy.ml

                                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.

                                julian@activitypub.spaceJ This user is from outside of this forum
                                julian@activitypub.spaceJ This user is from outside of this forum
                                julian@activitypub.space
                                wrote on last edited by
                                #21

                                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

                                1 Reply Last reply
                                0
                                • mariusor@metalhead.clubM mariusor@metalhead.club

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

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

                                  julian@activitypub.spaceJ This user is from outside of this forum
                                  julian@activitypub.spaceJ This user is from outside of this forum
                                  julian@activitypub.space
                                  wrote on last edited by
                                  #22

                                  mariusor@metalhead.club let's ask helge@mymath.rocks what implementor support for Delete(Array) looks like LOL

                                  1 Reply Last reply
                                  2
                                  • mariusor@metalhead.clubM This user is from outside of this forum
                                    mariusor@metalhead.clubM This user is from outside of this forum
                                    mariusor@metalhead.club
                                    wrote on last edited by
                                    #23

                                    @julian as long as it's in the spec, I don't really care.

                                    If we all bow to inferior implementations the ecosystem will stagnate. Mastodon's quirks have done enough damage in my opinion. My choice is to be brave and build for the future.

                                    PS. Not to brag or anything (🤞) but my implementation can operate on activities with arrays as object, actor, etc.

                                    One thing where you can lead the way (because the threadiverse would really benefit from it) is to accept arrays in inReplyTo (where you put all the ancestors of the current post, not just the parent).

                                    @helge

                                    trwnh@mastodon.socialT 1 Reply Last reply
                                    0
                                    • mariusor@metalhead.clubM mariusor@metalhead.club

                                      @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. 😛

                                      nutomic@lemmy.mlN This user is from outside of this forum
                                      nutomic@lemmy.mlN This user is from outside of this forum
                                      nutomic@lemmy.ml
                                      wrote on last edited by
                                      #24

                                      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.

                                      mariusor@metalhead.clubM 1 Reply Last reply
                                      1
                                      • nutomic@lemmy.mlN This user is from outside of this forum
                                        nutomic@lemmy.mlN This user is from outside of this forum
                                        nutomic@lemmy.ml
                                        wrote on last edited by
                                        #25

                                        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.

                                        1 Reply Last reply
                                        1
                                        • silverpill@mitra.socialS This user is from outside of this forum
                                          silverpill@mitra.socialS This user is from outside of this forum
                                          silverpill@mitra.social
                                          wrote on last edited by
                                          #26

                                          @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 Remove where object is 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.

                                          @rimu @nutomic @melroy @BentiGorlich

                                          julian@activitypub.spaceJ 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups