mirror of
https://github.com/caronc/apprise.git
synced 2024-11-25 01:24:03 +01: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 ..common import NotifyType
|
||||
from ..common import NotifyFormat
|
||||
from ..conversion import convert_between
|
||||
from ..utils import parse_list
|
||||
from ..utils import validate_regex
|
||||
from ..AppriseLocale import gettext_lazy as _
|
||||
@ -367,6 +368,10 @@ class NotifyPushover(NotifyBase):
|
||||
if self.notify_format == NotifyFormat.HTML:
|
||||
# https://pushover.net/api#html
|
||||
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:
|
||||
payload.update({'retry': self.retry, 'expire': self.expire})
|
||||
|
Loading…
Reference in New Issue
Block a user