feat: webhook notification channel with UI and ingest dispatch

Add webhook config (DB/env), JSON POST on events/problems, settings API,
Settings UI section, and notify_dispatch for multi-channel ingest.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
PTah
2026-05-29 16:09:40 +10:00
parent f7b5fff04e
commit 20fa7e2c27
13 changed files with 826 additions and 189 deletions
+16
View File
@@ -0,0 +1,16 @@
"""Dispatch ingest notifications to all configured channels."""
from sqlalchemy.orm import Session
from app.models import Event, Problem
from app.services import telegram_notify, webhook_notify
def notify_event(event: Event, *, db: Session | None = None) -> None:
telegram_notify.notify_event(event, db=db)
webhook_notify.notify_event(event, db=db)
def notify_problem(problem: Problem, event: Event | None = None, *, db: Session | None = None) -> None:
telegram_notify.notify_problem(problem, event, db=db)
webhook_notify.notify_problem(problem, event, db=db)