From e898240421dd1ce83a8fdcbee49b003bbcbba7ef Mon Sep 17 00:00:00 2001 From: verbumfeit Date: Tue, 27 Feb 2018 19:06:28 +0100 Subject: [PATCH] Eliminate repetition in Telegram notification Removal of unnecessary status argument --- mylar/notifiers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mylar/notifiers.py b/mylar/notifiers.py index f4dc0383..d37d860b 100644 --- a/mylar/notifiers.py +++ b/mylar/notifiers.py @@ -423,12 +423,12 @@ class TELEGRAM: else: self.token = test_token - def notify(self, message, status): + def notify(self, message): if not mylar.CONFIG.TELEGRAM_ENABLED: return # Construct message - payload = {'chat_id': self.userid, 'text': status + ': ' + message} + payload = {'chat_id': self.userid, 'text': message} # Send message to user using Telegram's Bot API try: @@ -446,7 +446,7 @@ class TELEGRAM: return sent_successfuly def test_notify(self): - return self.notify('Test Message', 'Release the Ninjas!') + return self.notify('Test Message: Release the Ninjas!') class SLACK: def __init__(self, test_webhook_url=None):