jellyfin / jellyfin-plugin-webhook

GNU General Public License v3.0
151 stars 49 forks source link

does this plugin work with matrtix? #122

Open jasondaigo opened 2 years ago

jasondaigo commented 2 years ago

is there a template possibility for matrix-appservice-webhook? im running this: https://github.com/turt2live/matrix-appservice-webhooks
does it work with such a webhook?

crobibero commented 2 years ago

Yes, this should work without issue. If you have something you are trying to accomplish please be more specific so I can assist in creating a template.

jasondaigo commented 2 years ago

Thanks for answering. I wanna be informed if a user logs in or start playback. Matrix server is on a different lan machine. Webhhooks are in this url format: http://192.168.1.3:9000/api/v1/matrix/hook/ACrwLeE7cnZitGOhdhBdKfWY1RDf1FO4dYFGXO1BddYGsQpaZ4DiuIfO4AoqOE46

But im no advanced user. I can only follow tutorials yet.
I successfully tested the webhook with curl with included "text", "format" and "displayname" like shown in a howto like this: curl --header "Content-Type: application/json" --data '{"text": "Hello world!", "format": "plain", "displayName": "My Cool Webhook"}' http://192.168.1.3:9000/api/v1/matrix/hook/ACrwLeE7cnZitGOhdhBdKfWY1RDf1FO4dYFGXO1BddYGsQpaZ4DiuIfO4AoqOE46 I assume the content needs to be json for Matrix also for Jellyfin.

Just pasting the Webhook Url clueless into Jellyfin-plugn-webhook will trigger something in the Appservice, but error showing up in the matrix.appservice-webhook log: error [WebService [Hook ACrwLeE7cnZitGOhdhBdKfWY1RDf1FO4dYFGXO1BddYGsQpaZ4DiuIfO4AoqOE46]] Invalid message: missing text or attachments

I tested a few examples in the template field, but again very clueless and me guessing is not very helpful :-) I mainly tested with Generic Destination type, not knowing if thats the right one.