Spacc BBS Spacc BBS
    • Categorie
    • Recenti
    • Tag
    • Popolare
    • Mondo
    • Utenti
    • Gruppi
    • Registrati
    • Accedi
    La nuova BBS è in fase Alpha. I post precedenti al 22 luglio 2024 potrebbero non essere trasferibili, ma rimarranno disponibili per la lettura su /old/.

    Reconciling ActivityPub Deletes with NodeBB deletion

    Pianificato Fissato Bloccato Spostato Uncategorized
    activitypub
    1 Post 6 Autori 37 Visualizzazioni
    Caricamento altri post
    • Da Vecchi a Nuovi
    • Da Nuovi a Vecchi
    • Più Voti
    Rispondi
    • Topic risposta
    Effettua l'accesso per rispondere
    Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
    • julian@community.nodebb.orgJ Questo utente è esterno a questo forum
      julian@community.nodebb.org
      ultima modifica di

      For a lot of things in ActivityPub, there are almost direct parallels in NodeBB. An as:Note object pairs well with a NodeBB post, an as:Person is a NodeBB user, etc.

      One thing that didn't map 1:1 was the Delete activity, which at surface level, seems rather straightforward — just delete the object! However, once you dig in, there are some additional considerations:

      • in NodeBB, we have two separate states for content removal.
        • A delete, where the post is still present (but its content unavailable to non-privileged users), and a
        • A purge, where the post is scrubbed from the database entirely, and all references to it, removed
      • in ActivityPub, there is a single activity, as:Delete
      • Implementors may opt to replace the object representation with an as:Tombstone (how quaint!), but they may also just opt to use a 404

      So there are some nuances that are left intentionally vague.

      Kaniini on SocialHub makes the argument that a Delete should be treated like a cache invalidation, which has its own merits.


      This is how NodeBB will interpret the protocol specification, and how we will align it with our own dual-state post deletion mechanic (delete & purge):

      1. When a local post is deleted, we will federate out an Update(Tombstone) referencing the id
      2. Afterwards, if the content is retrieved, an as:Tombstone will be served.
        • Deleted posts in NodeBB still maintain their place in the topic, so when the context is retrieved, the note will still be present in the collection.
      3. If we receive an Update(Tombstone), we will delete the local representation of the post
      4. When a local post is purged, we will federate out a Delete(Note)
      5. Afterwards, if the content is retrieved, we will serve a 404
        • The note will no longer exist in the context collection
      6. If we receive a Delete(Note) (or Article, or Question, etc.) we will not delete it immediately. Instead, as kaniini advises, we will attempt to retrieve the object from the origin:
        • If we see an as:Tombstone, we will delete the post (soft delete)
        • If we encounter a 404 or 410, we will purge the post (hard delete)

      I'm writing this out less as a guideline for myself, but to solicit opinions and to give others a chance to point out if I've interpreted the spec incorrectly.

      1 Risposta Ultima Risposta Rispondi Cita 0
      • Primo post
        Ultimo post