|
|
@ -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 |
|
|
|