Closed bun-dev closed 3 months ago
Could you elaborate how you like the payload to be displayed and can you give examples? Your service (Grafana?) seems to posts JSON to the webhook.
您能否详细说明您希望如何显示有效负载并举例说明?您的服务(Grafana?)似乎将 JSON 发布到 webhook。
Could you elaborate how you like the payload to be displayed and can you give examples? Your service (Grafana?) seems to posts JSON to the webhook.
Do you support Markdown syntax? The following command doesn't display correctly after I use it:
"Hello: ![](https://gotify.net/img/logo.png)"
No there is currently no support for it, since I don't know which service uses markdown as webhook payload. Is there any particular reason why you try to POST markdown to Gotify via webhooks instead of just using the API?
The following call should work for displaying Markdown:
curl -X POST "https://<host>/message?token=<token>" -H "Content-Type: application/json" \
-d "{ \"title\": \"Hello World\", \"message\": \"# Markdown\n\n- list\n\n- list2\", \"extras\": { \"client::display\": { \"contentType\": \"text/markdown\" } } }"
No there is currently no support for it, since I don't know which service uses markdown as webhook payload. Is there any particular reason why you try to POST markdown to Gotify via webhooks instead of just using the API?
The following call should work for displaying Markdown:
curl -X POST "https://<host>/message?token=<token>" -H "Content-Type: application/json" \ -d "{ \"title\": \"Hello World\", \"message\": \"# Markdown\n\n- list\n\n- list2\", \"extras\": { \"client::display\": { \"contentType\": \"text/markdown\" } } }"
Due to the delayed notifications from Synology's official Ds cam
app, I found in the official documentation that webhook support is available. I would like to use Gotify to push notifications and images. Could you please consider adding support for this feature?
Thank you!
Can you set the content type in the Surveillance Station? I could add a condition for text/markdown
and try to use Gotifys Markdown display option for the payload.
Will try that out next week.
Can you set the content type in the Surveillance Station? I could add a condition for
text/markdown
and try to use Gotifys Markdown display option for the payload.Will try that out next week.
It cannot be set directly to text/markdown
; only the following options are available:
POST
PUT
application/x-www-form-urlencoded
application/json
text/plain
Can you set additional request headers? Otherwise, this will be ugly to implement I think.
Done! Markdown is now supported. You can set the content type via a query parameter (e.g. https://.../webhook?content-type=text/markdown
). You can also take a look at the README for other options.
You can grab the plugin here: https://git.leon.wtf/leon/gotify-webhooks-plugin/-/packages/15
Please let me know if this works for you!
Is there any chance of this supporting markdown instead of raw json strings to gotify? thanks