mirror of
https://github.com/caronc/apprise.git
synced 2025-06-22 10:41:27 +02:00
Added support for markdown in Gotify plugin (#358)
Co-authored-by: Rémi Rigal <remi.rigal@orange.com>
This commit is contained in:
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…
x
Reference in New Issue
Block a user