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