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

Support for Outbound Webhooks #942

Open
Half-Shot opened this issue Jun 12, 2024 · 0 comments
Open

Support for Outbound Webhooks #942

Half-Shot opened this issue Jun 12, 2024 · 0 comments
Labels
Generic Hook Involves the Generic Hook service T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements.

Comments

@Half-Shot
Copy link
Contributor

Some users want bi-directional hookshottin', where messages from Matrix are sent along to a remote platform. So, this is the plan.

A new connection type called "Outbound Generic Webhooks" will be setup, with a very similar structure to the incoming webhooks. The default payload will be a JSON message containing the Matrix event structure.

The request will be a simple PUT to the URL specified in the state. There will be a X-Matrix-Hookshot-EventId header containing the event ID, as well as a as-yet-unspecified authentication token header. The token will given once during creation and can be refreshed, and will be given on each request.

Requests will be retried in a limited sense on failure, the limits will be configurable but the defaults will be to retry up to 5 times (in increasing delays) to hit the service. With Redis mode on, there may be the possibility of batching up events to send later but this is probably not part of the V1 feature.

For media messages, the payload will include the media (hookshot will download, and if required, decrypt it) as a blob on the upload. The default solution will be to include it as part of a multi-part response, where the JSON and the media will be separate parts.

Finally, it goes without saying this is not intended to be a replacement for Appservices which is a far more powerful and effective API for building proper Matrix integrations. However, if the platform you are integrating to is extremely limited then this may be an effective starting point.

@Half-Shot Half-Shot added T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements. Generic Hook Involves the Generic Hook service labels Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Generic Hook Involves the Generic Hook service T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements.
Projects
None yet
Development

No branches or pull requests

1 participant