Scroll to top

19/03/2022


2022/03/19#p1

0 comments: click to leave a comment

I decided to improve the support for incoming webmentions to better cater for different scenarios like updated mentions and deletions.

The Webmention spec states:

"If receiver had received a Webmention in the past with the same source and target then ... it should update any existing data it picked from source for the existing Webmention."

This should include all properties from the source (triggering a full check and rewrite) but I've currently just looked at changing the comment content on the assumption that everything else is the same. I may update this in future.

If the source has been removed (provides a 410 GONE HTTP response then the spec says the Webmention should be deleted or marked as deleted. This should also occur for an update where the source post still exists but the target is no longer mentioned. I'm now catering for outright deletions by removing the associated comment and will add a function to mark a comment as modified if the mention has been removed but the post still exists.

Of course, there is the massive caveat that this hasn't been tested fully. I know my duplicate detection works as I had added that recently but the updates and deletions are, as yet, unproven. I've only had one instance of receiving an updated mention so it's not a huge deal; even so, I wanted to cater for it.

No comments yet
Leave a reply



You can also:

Click here to reply using email Reply by email Send a webmention Send a Webmention



Close