mirror of
https://github.com/caronc/apprise.git
synced 2025-01-20 21:08:38 +01:00
Notifiarr footer and icon attributes set (#977)
This commit is contained in:
parent
97c7af4c4a
commit
bd28bf9651
@ -149,8 +149,8 @@ class NotifyNotifiarr(NotifyBase):
|
||||
})
|
||||
|
||||
def __init__(self, apikey=None, include_image=None,
|
||||
discord_user=None, discord_role=None, event=None,
|
||||
targets=None, source=None, **kwargs):
|
||||
discord_user=None, discord_role=None,
|
||||
event=None, targets=None, source=None, **kwargs):
|
||||
"""
|
||||
Initialize Notifiarr Object
|
||||
|
||||
@ -238,7 +238,7 @@ class NotifyNotifiarr(NotifyBase):
|
||||
|
||||
# Define any URL parameters
|
||||
params = {
|
||||
'image': 'yes' if self.include_image else 'no'
|
||||
'image': 'yes' if self.include_image else 'no',
|
||||
}
|
||||
|
||||
if self.source:
|
||||
@ -310,6 +310,7 @@ class NotifyNotifiarr(NotifyBase):
|
||||
'title': title,
|
||||
'content': '',
|
||||
'description': body,
|
||||
'footer': self.app_desc,
|
||||
},
|
||||
'ids': {
|
||||
'channel': channel,
|
||||
@ -319,6 +320,9 @@ class NotifyNotifiarr(NotifyBase):
|
||||
|
||||
if self.include_image and image_url:
|
||||
payload['discord']['text']['icon'] = image_url
|
||||
payload['discord']['images'] = {
|
||||
'thumbnail': image_url,
|
||||
}
|
||||
|
||||
if not self._send(payload):
|
||||
has_error = True
|
||||
|
@ -94,6 +94,12 @@ apprise_url_tests = (
|
||||
# Our expected url(privacy=True) startswith() response:
|
||||
'privacy_url': 'notifiarr://m...y/#123',
|
||||
}),
|
||||
('notifiarr://123/?apikey=myapikey&image=yes', {
|
||||
'instance': NotifyNotifiarr,
|
||||
}),
|
||||
('notifiarr://123/?apikey=myapikey&image=no', {
|
||||
'instance': NotifyNotifiarr,
|
||||
}),
|
||||
('notifiarr://123/?apikey=myapikey&source=My%20System', {
|
||||
'instance': NotifyNotifiarr,
|
||||
# Our expected url(privacy=True) startswith() response:
|
||||
|
Loading…
Reference in New Issue
Block a user