mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
push_notifications: Guard reference to RemotePushDevice.
This doesn’t exist when ZILENCER_ENABLED is False. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
68b205775e
commit
88b9a2cfbd
@@ -256,7 +256,7 @@ def get_info_from_apns_result(
|
||||
logger.info(
|
||||
"APNs: Removing invalid/expired token %s (%s)", device.token, result.description
|
||||
)
|
||||
if isinstance(device, RemotePushDevice):
|
||||
if settings.ZILENCER_ENABLED and isinstance(device, RemotePushDevice):
|
||||
result_info.delete_device_id = device.device_id
|
||||
else:
|
||||
result_info.delete_device_token = device.token
|
||||
|
Reference in New Issue
Block a user