Platform-Aware @-mentioning People on my Blog
This post's featured URL for sharing metadata is https://www.jvt.me/img/profile.jpg.
Since I started to publish short notes to my site, I've been trying to make them more social, such as mentioning others in my content.
Although I want to publish to my website, I don't want to just post to my own site, but also share these for folks following me on Twitter, so I configured automagic syndication of these notes to Twitter as tweets using Bridgy.
This led to a bit of a dilemma when mentioning others. These notes were being syndicated with a mention of i.e. Anna with her site's URL, which looked a bit weirder to folks on Twitter, and also didn't send her a notification on Twitter:
Happy birthday to me! A lovely start to the morning opening cards with a champagne flute of Tango, with the wonderful https://annadodson.co.uk and #Morph— Jamie Tanna | www.jvt.me (@JamieTanna) March 17, 2020
If you visit my site today you'll notice birthday balloons that I copied from Aaron Parecki this… https://t.co/qTyMhACXox pic.twitter.com/W1Atm1WF2N
But if I set the URL directly as her Twitter URL, then I wasn't being the best IndieWeb citizen, as I was giving in to the silo'd web.
The solution for this was to have some awareness of where the content was being published to, and then publish the correct URL for that service, if possible.
I decided that I didn't want this to happen when I first created the content (via my Micropub server but when the site renders itself, as then it's more up-to-date.
I can now @-mention folks by using their profile URL, such as
@annadodson.co.uk. If they have a Twitter URL configured for their site, it'll provide a Twitter URL on syndication. For folks that don't have a Twitter URL configured, it'll just syndicate their URL. If I want to simply @-mention a Twitter URL, I've already got functionality in my Micropub server that will rewrite a Twitter URL to an h-card with their name.
You can see an example at /mf2/2020/03/g1mpf/.
Update 2020-07-06: I noticed that the original Microformats2 for this wasn't quite working, as it wouldn't handle interacting with quote tweets. This is now addressed, but is a word of warning to anyone doing this! The straightforward fix can be found on the GitLab Merge Request that fixed it.