opensearch-project / notifications

Notifications plugin for OpenSearch enables other plugins to send notifications via Email, Slack, Amazon Chime, Custom web-hook etc channels
Apache License 2.0
25 stars 64 forks source link

[FEATURE] webhook request for dedicated channel type for Matrix #464

Open tgurr opened 2 years ago

tgurr commented 2 years ago

Is your feature request related to a problem? Please describe. It would be nice if a webhook channel type / template for the Matrix protocol could be added similiar to the already exising ones like Chime and Slack.

Describe the solution you'd like Have Matrix as a Channel type available in the dropdown for easily configuring notifications on /app/notifications-dashboards#/create-channel

Screenshot_20220530_152452

Describe alternatives you've considered It can be done via the Custom webhook but in this case you might be missing some additional features like sending the messages as m.notice instead of m.text and nice input fields for the server, room, access token and message type would be very much welcomed (see Gitea screenshot posted below).

Additional context Details on the official documentation: https://matrix.org/docs/guides/client-server-api#sending-messages

curl -XPOST -d '{"msgtype":"m.text", "body":"hello"}' "https://localhost:8448/_matrix/client/r0/rooms/%21asfLdzLnOdGRkdPZWu:localhost/send/m.room.message?access_token=YOUR_ACCESS_TOKEN"

An application that has added Matrix as a dedicated selectable Webhook is for example Gitea: https://github.com/go-gitea/gitea/commit/828a27feeb11474b848be183a8fce2d036dec3cc https://github.com/go-gitea/gitea/commit/bf6014644401dd3fdf9031670b3a00ccd866f49f

Screenshot_20220530_145426

kavilla commented 2 years ago

Hello @tgurr,

Thank you for opening! Seems like a great idea!

Will re-route to Notifications plugin for follow-up but might require @opensearch-project/opensearch-ux to weigh in as well.