mirror of
https://github.com/caronc/apprise.git
synced 2025-06-24 19:51:21 +02:00
Opsgenie don't combine title with body when not required (#655)
This commit is contained in:
parent
370b1af5a1
commit
f1990b14ce
@ -381,8 +381,8 @@ class NotifyOpsgenie(NotifyBase):
|
||||
# Initialize our has_error flag
|
||||
has_error = False
|
||||
|
||||
# We want to manually set the title onto the body if specified
|
||||
title_body = body if not title else '{}: {}'.format(title, body)
|
||||
# Use body if title not set
|
||||
title_body = body if not title else body
|
||||
|
||||
# Create a copy ouf our details object
|
||||
details = self.details.copy()
|
||||
@ -402,7 +402,7 @@ class NotifyOpsgenie(NotifyBase):
|
||||
# limitation
|
||||
if len(payload['message']) > self.opsgenie_body_minlen:
|
||||
payload['message'] = '{}...'.format(
|
||||
body[:self.opsgenie_body_minlen - 3])
|
||||
title_body[:self.opsgenie_body_minlen - 3])
|
||||
|
||||
if self.__tags:
|
||||
payload['tags'] = self.__tags
|
||||
|
Loading…
x
Reference in New Issue
Block a user