Rocket webhook urls are in https format. To be able to send a notification to Rocket, we need to set set SS validation to False. Otherwise a SSL handshake error is thrown and notification is not delivered.
This is the minor modification:
`
#######
import requests
import traceback
class RocketNotifier:
def notify(self, notification):
try:
payload = {
"text": notification.message
}
response = requests.post(notification.user_to_notify.profile.rocket_webhook_url, payload, verify=False)
if response.status_code == 200:
print "Rocket message sent"
else:
print "Failed to send Rocket message, API response %s " % response.status_code
except Exception as e:
print "Failed to send Rocket message"
#print(str(e))
traceback.print_exc()
raise
`