mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
aa9b45b5a1
The `alerts` collection lives in the platform database, but the Notifications worker was injecting `dbForProject` and writing alerts there. Webhooks dispatches with the user's project context, so alerts were being written to the user's project DB (which has no `alerts` collection), and `/v1/account/alerts` (which reads from `dbForPlatform`) returned nothing. Switch the worker to inject `dbForPlatform` instead. All alert reads (dedup lookup) and writes (persistAlert + ConsoleAdapter) now target the platform DB, independent of which project the dispatching event belongs to. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>