aioapns icon indicating copy to clipboard operation
aioapns copied to clipboard

send_notification now takes a function that is called on error.

Open skabber opened this issue 3 years ago • 0 comments

You can now pass a function as error_func that will get called when send_notification fails.

Example:

async def error_func(notification_id, response, device_token=device_token):
        await mark_tokens_as_invalid(device_token)
        return print(
            f'deregistering {device_token}')

await apns_client.send_notification(request, error_func=error_func)

skabber avatar Apr 29 '21 20:04 skabber