Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Webmentions Inlet #15

Open
muety opened this issue Apr 5, 2020 · 1 comment
Open

Idea: Webmentions Inlet #15

muety opened this issue Apr 5, 2020 · 1 comment

Comments

@muety
Copy link
Owner

muety commented Apr 5, 2020

Middleman bot should be able to act as a receiver for Webmentions. That is, it should be able to process an x-www-form-urlencdoded POST request like the following, send out a notification and return 202.

Request Example:

POST /api/inlets/webmention HTTP/1.1
Host: middleman.yourserver.tld
Content-Type: application/x-www-form-urlencoded

source=https://blog.bob.com/some-post.html&
target=https://alice.com/blog/original_post.html

The only problem here is that the Webmention request performed by its sender will not contain any information about the Telegram recipient, i.e. there is no way to transmit a recipient_token and therefore no way to route the notification to a registered user.

Proposal: Introduce a way to configure the bot using commands, including the ability to set inlet-specific parameters. E.g. a new /config command might be introduced that requires two arguments, corresponding to key and value. These key-value pairs are persisted at the server and used for any kind of configuration – in this case for routing Webmention notifications. Specifically, a Middleman user might "subscribe" herself to incoming Webmentions for a certain domain: /config inlet.webmentions.subscription "alice.com". This will tell the bot to notify Alice about a new Webmention containing any URL under "alice.com" as a target.

One problem with the above proposal is that it doesn't feature any type of authorization. If you are Alice, hosting a middleman instance with multiple users, any of those users could practically subscribe to your Webmentions. I'd consider that acceptable for now, but if anyone comes up with a better approach, please let me know!

@muety
Copy link
Owner Author

muety commented Apr 5, 2020

Not to be confused with the recently added webmentionio_webhook inlet. Webmention.io is a service that may act as a gateway. It receives Webmention requests from people's websites and, if configured so, forwards them to a webhook, which might well be the middleman bot. The service allows to configure a secret to be included in the webhook request, which can be perfectly used to transmit the recipient token.

In comparison, the purpose of this present feature is to be able to get rid of Webmention.io and have the middleman bot receive Webmention requests directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant