Add Mattermost notification channel support

Introduces Mattermost as a new notification channel, including backend service integration, controller validation, UI form fields, and updates to channel type enums in the database schema and migrations. This enables users to configure and send notifications via Mattermost webhooks.
This commit is contained in:
Hosteroid
2025-10-21 14:33:22 +03:00
parent ec0b5c61ea
commit 774379f107
6 changed files with 182 additions and 8 deletions

View File

@@ -182,7 +182,7 @@ CREATE TABLE IF NOT EXISTS user_notifications (
CREATE TABLE IF NOT EXISTS notification_channels (
id INT AUTO_INCREMENT PRIMARY KEY,
notification_group_id INT NOT NULL,
channel_type ENUM('email', 'telegram', 'discord', 'slack', 'webhook') NOT NULL,
channel_type ENUM('email', 'telegram', 'discord', 'slack', 'mattermost', 'webhook') NOT NULL,
channel_config JSON NOT NULL,
is_active BOOLEAN DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,

View File

@@ -1,5 +1,5 @@
-- Add 'webhook' to the channel_type ENUM in notification_channels table
-- This allows custom webhook integrations like Mattermost
-- Add 'webhook' and 'mattermost' to the channel_type ENUM in notification_channels table
-- This allows custom webhook integrations and Mattermost support
ALTER TABLE notification_channels
MODIFY COLUMN channel_type ENUM('email', 'telegram', 'discord', 'slack', 'webhook') NOT NULL;
MODIFY COLUMN channel_type ENUM('email', 'telegram', 'discord', 'slack', 'mattermost', 'webhook') NOT NULL;