Add notification channels and a provider abstraction

Users get a notification_channels table (replacing users.ntfy_topic); pages fan
out to every enabled channel through a notify.Provider registry, with ntfy as
the first provider. Fallbacks are typed {type, address}. Schema edited in place:
existing databases must be recreated.

Claude-Session: https://claude.ai/code/session_016mBLURvJoMuUEr9cB2RpUN
This commit is contained in:
Niklas Ye
2026-10-12 21:00:40 +02:00
parent 6292ad6708
commit b114251f45
42 changed files with 2200 additions and 611 deletions
+4
View File
@@ -345,6 +345,10 @@ func handleMe(db *sql.DB) http.HandlerFunc {
serverError(w, r, err)
return
}
if user.Channels, err = loadChannels(r.Context(), db, caller.ID, true); err != nil {
serverError(w, r, err)
return
}
var hash sql.NullString
var dismissed *int64
if err := db.QueryRowContext(r.Context(),