2. Versuch bug fix FCM
This commit is contained in:
1 parent
b5f928bf76
commit
df97539f27
9 files changed
+70
-18
No files matched your search
@@ -93,11 +93,13 @@ def unregister_push_token(**kwargs):
|
||||
@api_push_bp.route('/push/wake', methods=['POST'])
|
||||
@role_required(['Dispatcher', 'Administrator'])
|
||||
def wake_mobile_clients(**kwargs):
|
||||
"""Löst manuell ein FCM-Aufwachsignal für offline mobile Clients aus.
|
||||
"""Löst manuell ein FCM-Aufwachsignal für mobile Clients aus.
|
||||
|
||||
Optional kann mit ``group_id`` auf die Clients einer Gruppe eingeschränkt
|
||||
werden. Es werden nur Clients angesprochen, die aktuell als getrennt
|
||||
gelten und ein gültiges FCM-Token besitzen.
|
||||
werden. Angesprochen werden alle mobilen Clients mit gültigem FCM-Token,
|
||||
unabhängig davon, ob der Broker sie noch als verbunden führt. Gerade auf
|
||||
iOS bleibt der Verbindungsstatus häufig veraltet, obwohl der Push-Kanal
|
||||
weiterhin funktioniert.
|
||||
"""
|
||||
config = public_fcm_config()
|
||||
if not config.get('enabled'):
|
||||
@@ -125,6 +127,9 @@ def wake_mobile_clients(**kwargs):
|
||||
re_wake_before=current - cooldown if cooldown else None,
|
||||
group_id=group_id,
|
||||
auto_position_only=False,
|
||||
# Der Button soll alle registrierten mobilen Clients erreichen – auch
|
||||
# solche, die der Broker noch als verbunden führt (typisch bei iOS).
|
||||
include_connected=True,
|
||||
limit=1000,
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user