fix: use production IDs for unread Web Push (Closes #565)
This commit is contained in:
1 parent
92b0fd56ca
commit
8e74f022eb
3 files changed
+91
-15
No files matched your search
+2
-2
@@ -1739,9 +1739,9 @@ async def subscribe_push(payload: PushSubscriptionPayload, request: Request):
|
||||
headers={"Retry-After": "1"},
|
||||
) from error
|
||||
existing_ids = {
|
||||
int(item["notification_id"])
|
||||
int(item["id"])
|
||||
for item in current.get("items", [])
|
||||
if isinstance(item, dict) and str(item.get("notification_id", "")).isdigit()
|
||||
if isinstance(item, dict) and str(item.get("id", "")).isdigit()
|
||||
}
|
||||
await asyncio.to_thread(
|
||||
_push_subscription_store.mark_delivered, device_id, existing_ids
|
||||
|
||||
@@ -59,9 +59,9 @@ async def dispatch_unread_updates(
|
||||
try:
|
||||
page = await unread()
|
||||
thread_ids = {
|
||||
int(item["notification_id"])
|
||||
int(item["id"])
|
||||
for item in page.get("items", [])
|
||||
if isinstance(item, dict) and str(item.get("notification_id", "")).isdigit()
|
||||
if isinstance(item, dict) and str(item.get("id", "")).isdigit()
|
||||
}
|
||||
deliveries = await asyncio.to_thread(store.claim_unseen, thread_ids)
|
||||
if session_active is not None:
|
||||
|
||||
Reference in new issue
Block a user