How to receive webmentions?

#34 · open · 2 comments

View on GitHub ↗

philgyford

The README includes this bullet point: > Discovery of mentions in a publisher's post, the handling of finding what the Webmention callback is for the reference and also handling of incoming Webmention requests are handled. I may well have missed something, but I can't see something in the examples or code that fulfils "handling of incoming Webmention requests are handled." So does this project handle incoming webmentions? If so, how?

Comments

bear

This project doesn't actively handle incoming webmentions because that means having an active web endpoint. What it provides is all of the tools needed to process the incoming data. You would need to setup a `/webmention` handler that accepted GET, POST with source,target and vouch parameters With that information you can then call the `findMentions` function at https://github.com/bear/ronkyuu/blob/main/src/ronkyuu/webmention.py#L40 to get a list of all mentions in the sourceURL and optionally see if any match the targetURL

philgyford

Ah, thank you! I completely understand that setting up the web endpoint isn't something this handles, but I hadn't realised that `findMentions()` is for handling the incoming data to such an endpoint. It would be nice to make this more explicit in the README. Happy to do a PR to address this once I've figured out how to get things working.