From 7099238f15a5218f7211c50f000423650c5dad61 Mon Sep 17 00:00:00 2001 From: Jonathan Echavarria Date: Mon, 16 Oct 2017 11:04:13 -0400 Subject: [PATCH] added error notifications to pushover notification channel --- extensions/notifications/channels/pushover.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/notifications/channels/pushover.rb b/extensions/notifications/channels/pushover.rb index 1e546dbb0..4424d147b 100644 --- a/extensions/notifications/channels/pushover.rb +++ b/extensions/notifications/channels/pushover.rb @@ -13,10 +13,14 @@ module Channels # Configure the Pushover Client client = Rushover::Client.new(@config.get('beef.extension.notifications.pushover.app_key')) - client.notify(@config.get('beef.extension.notifications.pushover.user_key'), message) + res = client.notify(@config.get('beef.extension.notifications.pushover.user_key'), message) + print_error '[Notifications] Pushover notification failed' unless res.ok? + rescue Exception => e + print_error "[Notifications] Pushover notification initalization failed: '#{e.message}'" end end end end end end +