feat: add Matrix chat notification support (#211)

Implements native Matrix notification channel support, allowing users
to receive service alerts in any Matrix room via the Client-Server API.

Changes:
- server/service-operation/notification/matrix.go: new Matrix service
  implementing the NotificationService interface (PUT /_matrix/client/v3/...)
- server/service-operation/notification/types.go: add MatrixHomeserver,
  MatrixRoomID, MatrixAccessToken fields to AlertConfiguration
- server/service-operation/notification/manager.go: register MatrixService
- server/pb_migrations/1772200000_updated_alert_configurations_matrix.js:
  PocketBase migration adding matrix fields and notification_type value
- application: Matrix option in channel dialog with homeserver/room/token
  fields, tab filter, list display, type definitions and translations (en, km)
- application/public/upload/notification/matrix.png: Matrix channel icon
This commit is contained in:
MrSchneemann
2026-03-01 10:39:46 +01:00
parent f2c338ced9
commit 91ceddc489
13 changed files with 495 additions and 8 deletions
@@ -73,6 +73,7 @@ export const settingsTranslations: SettingsTranslations = {
googleChat: "Google Chat",
email: "Email",
webhook: "Webhook",
matrix: "Matrix",
// NotificationChannelDialog.tsx
editChannel: "Edit Notification Channel",
@@ -129,6 +130,12 @@ export const settingsTranslations: SettingsTranslations = {
notifiarrChannelIdDesc: "The Discord channel ID where notifications will be sent",
gotifyServerUrl: "Server URL",
gotifyServerUrlDesc: "The URL of your Gotify server",
matrixHomeserver: "Homeserver URL",
matrixHomeserverDesc: "The URL of your Matrix homeserver (e.g. https://matrix.org)",
matrixRoomId: "Room ID",
matrixRoomIdDesc: "The Matrix room ID to send notifications to (e.g. !abc123:matrix.org)",
matrixAccessToken: "Access Token",
matrixAccessTokenDesc: "The access token of your Matrix bot account",
errorSaveChannel: "Failed to save notification channel",
channelNamePlaceholder: "My Notification Channel",
@@ -150,6 +157,9 @@ export const settingsTranslations: SettingsTranslations = {
notifiarrChannelIdPlaceholder: "Discord Channel ID",
gotifyServerUrlPlaceholder: "https://your-gotify-server.com",
webhookUrlPlaceholder: "https://api.example.com/webhook",
matrixHomeserverPlaceholder: "https://matrix.org",
matrixRoomIdPlaceholder: "!roomid:matrix.org",
matrixAccessTokenPlaceholder: "syt_...",
// DataRetentionSettings.tsx
// permissionNotice: "Permission Notice:",
@@ -73,6 +73,7 @@ descriptionChannelsServices: "កំណត់រចនាសម្ព័ន្
googleChat: "Google Chat",
email: "អ៊ីមែល",
webhook: "Webhook",
matrix: "Matrix",
// NotificationChannelDialog.tsx
editChannel: "កែសម្រួលបណ្តាញជូនដំណឹង",
@@ -129,6 +130,12 @@ descriptionChannelsServices: "កំណត់រចនាសម្ព័ន្
notifiarrChannelIdDesc: "លេខសម្គាល់បណ្តាញ Discord ដែលការជូនដំណឹងនឹងត្រូវបានផ្ញើទៅ",
gotifyServerUrl: "URL នៃម៉ាស៊ីនបម្រើ",
gotifyServerUrlDesc: "URL នៃម៉ាស៊ីនបម្រើ Gotify របស់អ្នក",
matrixHomeserver: "Homeserver URL",
matrixHomeserverDesc: "URL នៃ Matrix homeserver របស់អ្នក (ឧ. https://matrix.org)",
matrixRoomId: "Room ID",
matrixRoomIdDesc: "Matrix room ID ដែលការជូនដំណឹងនឹងត្រូវបានផ្ញើទៅ (ឧ. !abc123:matrix.org)",
matrixAccessToken: "Access Token",
matrixAccessTokenDesc: "Access token នៃ Matrix bot account របស់អ្នក",
errorSaveChannel: "បរាជ័យក្នុងការរក្សាទុកបណ្តាញជូនដំណឹង",
channelNamePlaceholder: "ប៉ុស្តិ៍ផ្ទាល់សារជូនដំណឹងរបស់ខ្ញុំ",
@@ -150,6 +157,9 @@ descriptionChannelsServices: "កំណត់រចនាសម្ព័ន្
notifiarrChannelIdPlaceholder: "ID ប៉ុស្តិ៍ផ្ទាល់សារ Discord",
gotifyServerUrlPlaceholder: "https://your-gotify-server.com",
webhookUrlPlaceholder: "https://api.example.com/webhook",
matrixHomeserverPlaceholder: "https://matrix.org",
matrixRoomIdPlaceholder: "!roomid:matrix.org",
matrixAccessTokenPlaceholder: "syt_...",
// DataRetentionSettings.tsx
permissionNoticeDataRetention: "ជាអ្នកប្រើប្រាស់អ្នកគ្រប់គ្រង អ្នកមិនមានសិទ្ធចូលដំណើរការការកំណត់រក្សាទុកទិន្នន័យទេ។ ការកំណត់ទាំងនេះអាចត្រូវបានចូលដំណើរការនិងកែប្រែដោយតែអ្នកគ្រប់គ្រងដ៏ខ្ពស់ប៉ុណ្ណោះ។",
@@ -71,6 +71,7 @@ export interface SettingsTranslations {
googleChat: string;
email: string;
webhook: string;
matrix: string;
// NotificationChannelDialog.tsx
editChannel: string;
@@ -127,6 +128,12 @@ export interface SettingsTranslations {
notifiarrChannelIdDesc: string;
gotifyServerUrl: string;
gotifyServerUrlDesc: string;
matrixHomeserver: string;
matrixHomeserverDesc: string;
matrixRoomId: string;
matrixRoomIdDesc: string;
matrixAccessToken: string;
matrixAccessTokenDesc: string;
errorSaveChannel: string;
channelNamePlaceholder: string;
@@ -148,6 +155,9 @@ export interface SettingsTranslations {
notifiarrChannelIdPlaceholder: string;
gotifyServerUrlPlaceholder: string;
webhookUrlPlaceholder: string;
matrixHomeserverPlaceholder: string;
matrixRoomIdPlaceholder: string;
matrixAccessTokenPlaceholder: string;
// DataRetentionSettings.tsx
// permissionNotice: string;