mirror of https://github.com/caronc/apprise
Added support for markdown in Gotify plugin (#358)
Co-authored-by: Rémi Rigal <remi.rigal@orange.com>pull/363/head
parent
073dad68d0
commit
48cac98d3b
|
@ -35,7 +35,7 @@ import requests
|
||||||
from json import dumps
|
from json import dumps
|
||||||
|
|
||||||
from .NotifyBase import NotifyBase
|
from .NotifyBase import NotifyBase
|
||||||
from ..common import NotifyType
|
from ..common import NotifyType, NotifyFormat
|
||||||
from ..utils import validate_regex
|
from ..utils import validate_regex
|
||||||
from ..AppriseLocale import gettext_lazy as _
|
from ..AppriseLocale import gettext_lazy as _
|
||||||
|
|
||||||
|
@ -182,6 +182,13 @@ class NotifyGotify(NotifyBase):
|
||||||
'message': body,
|
'message': body,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self.notify_format == NotifyFormat.MARKDOWN:
|
||||||
|
payload["extras"] = {
|
||||||
|
"client::display": {
|
||||||
|
"contentType": "text/markdown"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Our headers
|
# Our headers
|
||||||
headers = {
|
headers = {
|
||||||
'User-Agent': self.app_id,
|
'User-Agent': self.app_id,
|
||||||
|
|
Loading…
Reference in New Issue