mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
more helpful error message when missing APNS certs
(imported from commit e21dc627844b9e28f93a924097176481d4135947)
This commit is contained in:
@@ -32,6 +32,8 @@ def hex_to_b64(data):
|
|||||||
# mobile app
|
# mobile app
|
||||||
@statsd_increment("apple_push_notification")
|
@statsd_increment("apple_push_notification")
|
||||||
def send_apple_push_notification(user, alert, **extra_data):
|
def send_apple_push_notification(user, alert, **extra_data):
|
||||||
|
if not connection:
|
||||||
|
logging.error("Attempting to send push notification, but no connection was found. This may be because we could not find the APNS Certificate file.")
|
||||||
# Sends a push notifications to all the PushClients
|
# Sends a push notifications to all the PushClients
|
||||||
# Only Apple Push Notifications clients are supported at the moment
|
# Only Apple Push Notifications clients are supported at the moment
|
||||||
tokens = [b64_to_hex(device.token) for device in AppleDeviceToken.objects.filter(user=user)]
|
tokens = [b64_to_hex(device.token) for device in AppleDeviceToken.objects.filter(user=user)]
|
||||||
|
|||||||
Reference in New Issue
Block a user