I think I've sorted the internal webmentions issue. It was a two-pronged problem:
- the change in permalink structure meant that the endpoint was looking for the new version of URLs when the old version existed in the database
- the blog was listing the permalink in format
base_url/?date=
but the permalink being saved to the database was in the formatbase_url?date=
The endpoint itself was fine and working properly it's just that the target URLs were wrong. I have updated the function that creates new posts to save the permalink with the slash and updated all the incorrect permalinks with a couple of SQL queries:
update TABLE_NAME set FIELD_NAME =
replace(FIELD_NAME, 'text to find', 'text to replace with');