Skip to content

Generate a list of content to enable preventing double posting

Jamie Tanna requested to merge feature/content-deduplication into master

To make it possible to prevent me from re-submitting the same piece of content to the site (under www-api#24) I first need some way to generate a set of what content currently exists on the site.

Instead of owning it all within the Micropub server, we can mix it between the site itself and the Micropub server.

In this case, we generate a object, such as:

{
  "https://www.reddit.com/r/apexlegends/comments/eynsya/todays_patch_notes_leaked/": [
    {
      "kind": "bookmarks",
      "url": "https://www.jvt.me/mf2/2020/02/...../"
    },
    {
      "kind": "likes",
      "url": "https://www.jvt.me/mf2/2020/02/m3xdk/"
    }
  ]
}

This will then allow the Micropub server to look up a given URL, and if it's found on the site, it then can determine whether it has a conflict for the given post, and then return that URL, otherwise allow creating it again.

Merge request reports