[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. 馃珫 Status page with uptime monitoring & API monitoring as code 馃珫 openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor

fix(notifications): show region location name in recovery and degraded emails (#2287) master

The recovery and degraded email notifications passed the raw region code (e.g. "fra") to the template, while the alert email looked it up in regionDict to show the human-readable location (e.g. "Frankfurt, Germany"). This made the three email types inconsistent for the same monitor. Mirror the alert lookup in sendRecovery and sendDegraded so all three show the location name. The region value is a validated Region (z.enum over ALL_REGIONS) and regionDict is keyed on Region, so the lookup always resolves. Updated the email tests to drive the real `regions` array path (the existing cases passed a singular `region` the code never reads) and assert the resolved location for alert, recovery, and degraded.


+8 -5
2 changed files