Converting Webmentions to Push Notifications
Since I set up Webmentions in January 2018 using Webmention.io, I've been starting to receive more interactions with my site across the social web.
However, up until today, the only way I'd be able to see what Webmentions I'd received was to go and actively check. I'd, many times a day, open Indigenous for Android, the Indie reader I use, and refresh it to look at what's in my notifications.
This isn't quite as interactive as you'd want, especially as these could be used for near-realtime communication across websites. While thinking about it, I started looking through the documentation for Webmention.io, but found no mention of it. Failing that, I logged into the dashboard and saw a "Web Hooks" button, which was exactly what I wanted!
This Webhook hits the newly created
https://www-api.jvt.me/notifications/webmention endpoint with a shared secret (to prevent spam) and then sends a push notification via PushBullet, which I currently use to notify me when my site has deployed.
You can see the code changes required on the Merge Request on GitLab.com: Add webhook for mapping Webmention.io to push notifications.