mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Exit without exception if this APNS attempt has no connection
(imported from commit bbdd9f3e11946739459f34b2580e4a7371b158a0)
This commit is contained in:
		@@ -39,6 +39,10 @@ def hex_to_b64(data):
 | 
			
		||||
    return base64.b64encode(binascii.unhexlify(data))
 | 
			
		||||
 | 
			
		||||
def _do_push_to_apns_service(user, message, apns_connection):
 | 
			
		||||
    if not apns_connection:
 | 
			
		||||
        logging.info("Not delivering APNS message %s to user %s due to missing connection" % (message, user))
 | 
			
		||||
        return
 | 
			
		||||
 | 
			
		||||
    apns_client = APNs(apns_connection)
 | 
			
		||||
    ret = apns_client.send(message)
 | 
			
		||||
    if not ret:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user