Added support for markdown in Gotify plugin (#358)

Co-authored-by: Rémi Rigal <remi.rigal@orange.com>
This commit is contained in:
RemiRigal 2021-02-11 17:10:20 +01:00 committed by GitHub
parent 073dad68d0
commit 48cac98d3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ import requests
from json import dumps
from .NotifyBase import NotifyBase
from ..common import NotifyType
from ..common import NotifyType, NotifyFormat
from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _
@ -182,6 +182,13 @@ class NotifyGotify(NotifyBase):
'message': body,
}
if self.notify_format == NotifyFormat.MARKDOWN:
payload["extras"] = {
"client::display": {
"contentType": "text/markdown"
}
}
# Our headers
headers = {
'User-Agent': self.app_id,