feat(notify): name regions and link the console in alerts; consent to subscribe
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 11m8s
ci / test (pull_request) Successful in 13m45s
ci / build (pull_request) Successful in 19m0s
ci / image (pull_request) Successful in 6m5s

Alert mails and chat messages named regions by id. They now show the
region's name and mails link the monitor in the console.

Visitors of a status page accept the platform's terms and the page's
privacy policy, where set, before they can subscribe to it; the status
page server and the API both check it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-26 20:16:28 +01:00
1 parent cca4e80e54
commit 2d4bd10c9b
16 files changed
+660 -479

No files matched your search

+3 -1
View File
@@ -367,10 +367,12 @@ func (s *Server) serveSubscription(c *gin.Context, e entry, kind routeKind, host
switch {
case kind == routeSubscribe && c.Request.Method != http.MethodPost:
c.Redirect(http.StatusSeeOther, base+"#subscribe")
case kind == routeSubscribe && c.PostForm("accept") == "" && len(web.SubscribeConsent(snap, base)) > 0:
notice(http.StatusUnprocessableEntity, i18n.T(ctx, "page.subscribe.title"), i18n.T(ctx, "page.subscribe.accept_required"), nil)
case kind == routeSubscribe:
err := subs.Subscribe(ctx, agentapi.SubscribeRequest{
Host: host, Slug: slug, Email: c.PostForm("email"), IP: c.ClientIP(),
Locale: c.GetHeader("Accept-Language"), PageURL: pageURL(c, base),
Locale: c.GetHeader("Accept-Language"), PageURL: pageURL(c, base), Accepted: true,
})
switch {
case err == nil: