remy / wm

webmention check service
https://webmention.app
103 stars 17 forks source link

Nested u-url gets picked up as source in rss feed #62

Open aciccarello opened 1 year ago

aciccarello commented 1 year ago

I noticed strange behavior on webmention sending based on my atom feed where one of the targets was getting picked up as the source.

I debugged the code and realized a u-url inside of an h-cite of the post I was replying to was getting picked up as the permalink. It seems like links.js picks up the first u-url which in my case doesn't appear for the post in the feed.

https://github.com/remy/wm/blob/f61809c27d159607673ddb8c8ed009514bcd88d1/lib/links.js#L16-L19

I was able to resolve the issue by stripping all u-url from the feed, which triggers a fallback to the feed element url, but simply looking for any u-url seems too simple.