2013-10-23 19:39:57 +02:00
|
|
|
from __future__ import absolute_import
|
|
|
|
|
2016-06-04 16:52:18 +02:00
|
|
|
from typing import Any
|
|
|
|
|
2013-10-23 19:39:57 +02:00
|
|
|
from django.core.management.base import BaseCommand
|
|
|
|
from zerver.lib.push_notifications import check_apns_feedback
|
|
|
|
|
|
|
|
class Command(BaseCommand):
|
|
|
|
help = """Checks the Apple Push Notifications Service for any tokens that have been
|
|
|
|
invalidated, and removes them from the database.
|
|
|
|
|
|
|
|
Usage: ./manage.py check_apns_tokens"""
|
|
|
|
|
|
|
|
def handle(self, *args, **options):
|
2016-06-04 16:52:18 +02:00
|
|
|
# type: (*Any, **Any) -> None
|
2013-10-23 19:39:57 +02:00
|
|
|
check_apns_feedback()
|