Please note: This site is in an active redesign. Some things might be a little off 🧐

EH

Added Locally Stored Webmentions

The main part of my newwwyear 2019 goal is storing webmentions locally and displaying them on my website again, as well as adding moderation support.

It's coming along nicely. So far, I've imported all existing webmentions from webmention.io and stored them locally alongside my post storage. So if my post is stored in /2018/11/15/5/post.md then my webmentions would be stored in /2018/11/15/5/mentions/ each webmention is stored as a .json file with the source url being the filename. This allows for one webmention per file and if I want to load all the webmentions for a specific post, I just open up all the files in the mentions directory. So far, I'm really liking this and how well it's working.

If it's a homepage mention, it will save the webmention in /mentions/homepage/ and if it's not a known post, right now it will collect the webmention in /mentions/unknown. Again, all of these webmentions are stored as individual files. If I recieve an updated webmention, it overwrites the file, so I get the updated information.

Besides just downloading all existing webmentions, I have also added support so that when webmention.io receives a new webmention, it pings my server and my server will go ahead and download that webmention and save it locally. This means that I am now only relying on webmention.io to deliver my webmentions, not for any long-term storage.

Finally, I've added support for displaying webmentions on post pages. I used to have this when my website was powered by Jekyll, but when I moved to a dynamic website, I didn't bother adding that functionality back until I could do it the way I wanted it. Now that I have my local storage I was able to go back to displaying them. Below is a screenshot of the webmention displays on one of my posts:

I'm still trying to tweak exactly how I want things, but I am pretty happy with things for a first pass. I am avoiding "metrics numbers" so instead of display any totals, I am trying to just display the content. Instead of showing 5 "likes" I would just display 5 πŸ‘ and of course each reacji will display on it's own as well.

Displaying Responses on Feeds

I am not currently displaying mentions for posts when they display on feed pages. I am thinking I might just display a row of emoji representing that last 10 responses. If they are reacji, it would display the reacji, for the rest I would translate the response types to the following emojis: likes πŸ‘, replies πŸ’¬, repost ♻️, bookmark πŸ”– , listen 🎧, mentions πŸ’­. It would show a recent snapshot of activity on a post without giving in to numbers.

Moderating Webmentions

I also am not doing any moderation of posts currently, every webmention automatically gets added and displayed. I can delete a webmention, of course, but there are protections against spam appearing until I delete it. I outlined how I want to deal with moderation, the 2nd level connections are going to be a bit tricky so my goal is to first just start with immediate connections as always accepted, others unlisted until I moderate. Then I'll need to create a mute/block list and have incoming webmentions check that list and respond appropriately.

Receiving Webmention Deletes

Finally, if someone sends a webmention delete (a HTTP 410 Gone response from a webmention source url) right now I don't think my website will do anything, in fact, I don't even know if webmention.io supports them. I would like to be able to accept and process webmention deletes. My plan is not to actually erase a webmention that is "deleted" but instead, to set the visibility to private. I can of course, manually delete any private webmentions that I don't want any more.

50.5 β„‰β˜οΈcolophonnewwwyearindieweb-goalstechindieweb
posted using indigenous.abode.pub

Reactions

Replies

@EddieHinkle very cool. I’ve been thinking about doing something like this

@EddieHinkle It’s one topic I keep going back on every time. Is it right to store complete content that is β€œowned” by someone else? I am always divided (more so post discussions around GDPR). So I fall back to my current approach - load mentions on page load.

Btw a technical question, is there a server polling webmention.io for new mention? Didn’t understand the download part.