Don't allow double-posting of certain content types
To prevent me from re-submitting certain types of content - namely those that I don't feel like I want to repeat - bookmarks/likes/reposts/rsvps.
We can utilise the new endpoint on the site
https://www.jvt.me/content-deduplication.json
which lets us know what
content is already there:
{
"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.
But, due to the time lag between pushing a piece of content and the site rebuilding, we can't always rely on it in the case that we re-submit in a short period of time.
In this case we add an in-memory cache of posts that allows immediate feedback, before we have them live.
Closes #24 (closed).