Add Telegram and Pushover as notification channels

Both send to one fixed address each (api.telegram.org, api.pushover.net), take part in routing rules and the channel count, have a Send test that shows the service's own refusal, and keep their tokens and keys encrypted and out of errors and the audit log. A Telegram message carries one button, and a Pushover message one link, to the page where an alert can be acknowledged, silenced or snoozed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-05 00:30:29 +01:00
1 parent 9f366c37de
commit 31f4debb9a
22 files changed
+670 -37

No files matched your search

+22 -2
View File
@@ -450,6 +450,22 @@ export interface GotifySettings {
priority: number;
}
export interface TelegramSettings {
enabled: boolean;
token: string;
chatId: string;
silent: boolean;
}
export interface PushoverSettings {
enabled: boolean;
appToken: string;
userKey: string;
device: string;
/** -2 (no notification) to 2 (emergency: repeats until acknowledged). */
priority: number;
}
export interface NtfySettings {
enabled: boolean;
url: string;
@@ -475,7 +491,7 @@ export interface WebhookSettings {
secret: string;
}
export type NotifyChannelId = "gotify" | "ntfy" | "smtp" | "webhook" | "webPush";
export type NotifyChannelId = "gotify" | "ntfy" | "telegram" | "pushover" | "smtp" | "webhook" | "webPush";
export interface RoutingRule {
id: string;
@@ -626,6 +642,8 @@ export interface DigestSettings {
export interface AppSettings {
gotify: GotifySettings;
ntfy: NtfySettings;
telegram: TelegramSettings;
pushover: PushoverSettings;
smtp: SmtpSettings;
webhook: WebhookSettings;
webPush: WebPushSettings;
@@ -3169,7 +3187,7 @@ export interface PrivacyOverview {
servers: number;
serversWithAgent: number;
profilePictures: ProfilePictureSettings & { identityProviderHost: string | null };
channels: Record<"gotify" | "ntfy" | "smtp" | "webhook" | "webPush", { enabled: boolean; host: string | null }>;
channels: Record<"gotify" | "ntfy" | "telegram" | "pushover" | "smtp" | "webhook" | "webPush", { enabled: boolean; host: string | null }>;
};
}
@@ -4361,6 +4379,8 @@ export const api = {
request<{ settings: AppSettings }>("/api/settings", { method: "PUT", body: JSON.stringify(data) }),
testGotify: (data: { url: string; token: string; priority?: number }) =>
request<{ ok: true }>("/api/settings/test-gotify", { method: "POST", body: JSON.stringify(data) }),
testTelegram: (data: { token: string; chatId: string; silent?: boolean }) => request<{ ok: true }>("/api/settings/test-telegram", { method: "POST", body: JSON.stringify(data) }),
testPushover: (data: { appToken: string; userKey: string; device?: string; priority?: number }) => request<{ ok: true }>("/api/settings/test-pushover", { method: "POST", body: JSON.stringify(data) }),
testNtfy: (data: { url: string; topic: string; token?: string; priority?: number }) =>
request<{ ok: true }>("/api/settings/test-ntfy", { method: "POST", body: JSON.stringify(data) }),
testSmtp: (data: { host: string; port?: number; secure?: boolean; username?: string; password?: string; from: string; to: string }) =>