fix FCM push notifications
This commit is contained in:
1 parent
560d9c19b3
commit
d801a18db5
4 files changed
+177
-6
No files matched your search
@@ -275,6 +275,13 @@ class HttpServer:
|
||||
def _add_sub(self, sub: _Subscriber) -> None:
|
||||
with self._subs_lock:
|
||||
self._subs.setdefault(sub.device_id, []).append(sub)
|
||||
# M5: a live subscriber will sync the outbox -- tell the adapter to
|
||||
# drop any held-back (deferred) pushes so the turn-end flush doesn't
|
||||
# duplicate what the app already shows. getattr-guard: test doubles
|
||||
# may use a bare adapter stub.
|
||||
on_online = getattr(self._adapter, "on_device_online", None)
|
||||
if on_online is not None:
|
||||
on_online()
|
||||
|
||||
def _remove_sub(self, sub: _Subscriber) -> None:
|
||||
with self._subs_lock:
|
||||
|
||||
Reference in new issue
Block a user