added error notifications to pushover notification channel

This commit is contained in:
Jonathan Echavarria
2017-10-16 11:04:13 -04:00
parent 45fd6abade
commit 7099238f15

View File

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