From f1990b14ce0a367fe92129387c6e4ba03c37d346 Mon Sep 17 00:00:00 2001 From: Kenton Parton Date: Tue, 27 Sep 2022 23:30:15 +0100 Subject: [PATCH] Opsgenie don't combine title with body when not required (#655) --- apprise/plugins/NotifyOpsgenie.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apprise/plugins/NotifyOpsgenie.py b/apprise/plugins/NotifyOpsgenie.py index 9ae9ed79..a78dbb49 100644 --- a/apprise/plugins/NotifyOpsgenie.py +++ b/apprise/plugins/NotifyOpsgenie.py @@ -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