mirror of
https://github.com/caronc/apprise.git
synced 2025-06-21 10:17:46 +02:00
Adds Markdown support to Pushover (#607)
This commit is contained in:
parent
e95484349e
commit
fa2f03d1fd
@ -30,6 +30,7 @@ import requests
|
|||||||
from .NotifyBase import NotifyBase
|
from .NotifyBase import NotifyBase
|
||||||
from ..common import NotifyType
|
from ..common import NotifyType
|
||||||
from ..common import NotifyFormat
|
from ..common import NotifyFormat
|
||||||
|
from ..conversion import convert_between
|
||||||
from ..utils import parse_list
|
from ..utils import parse_list
|
||||||
from ..utils import validate_regex
|
from ..utils import validate_regex
|
||||||
from ..AppriseLocale import gettext_lazy as _
|
from ..AppriseLocale import gettext_lazy as _
|
||||||
@ -367,6 +368,10 @@ class NotifyPushover(NotifyBase):
|
|||||||
if self.notify_format == NotifyFormat.HTML:
|
if self.notify_format == NotifyFormat.HTML:
|
||||||
# https://pushover.net/api#html
|
# https://pushover.net/api#html
|
||||||
payload['html'] = 1
|
payload['html'] = 1
|
||||||
|
elif self.notify_format == NotifyFormat.MARKDOWN:
|
||||||
|
payload['message'] = convert_between(
|
||||||
|
NotifyFormat.MARKDOWN, NotifyFormat.HTML, body)
|
||||||
|
payload['html'] = 1
|
||||||
|
|
||||||
if self.priority == PushoverPriority.EMERGENCY:
|
if self.priority == PushoverPriority.EMERGENCY:
|
||||||
payload.update({'retry': self.retry, 'expire': self.expire})
|
payload.update({'retry': self.retry, 'expire': self.expire})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user