feat: add Matrix chat notification support (#211)#215
Open
MrSchneemann wants to merge 2 commits intooperacle:developfrom
Open
feat: add Matrix chat notification support (#211)#215MrSchneemann wants to merge 2 commits intooperacle:developfrom
MrSchneemann wants to merge 2 commits intooperacle:developfrom
Conversation
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
Matrix notifications now send both a plain-text fallback and an HTML formatted_body (org.matrix.custom.html) so Element and other Matrix clients render rich, colored alerts: - Down/failed/error → red (#E74C3C) - Warning/expiring → yellow (#F39C12) - Maintenance/paused → orange (#E67E22) - Up/resolved → green (#2ECC71) - Default/info → blue (#3498DB) Detail lines from the plain-text message are rendered as a <ul> bullet list beneath the colored heading. Plain Body is preserved for clients without HTML support. Also includes resource type (CPU/DISK/etc.) in fallback server alert messages to improve context.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements native Matrix chat notification support as requested in #211.
org.matrix.custom.html):Changes
server/service-operation/notification/matrix.go— Matrix notification service with HTML formattingserver/service-operation/notification/types.go— addedmatrix_homeserver,matrix_room_id,matrix_access_tokenfieldsserver/service-operation/notification/manager.go— registered MatrixServiceserver/pb_migrations/1772200000_updated_alert_configurations_matrix.js— DB migration adding Matrix fields and select valueapplication/src/— Matrix option in channel dialog, list view, settings tabs, and translations (EN + KM)application/public/upload/notification/matrix.png— Matrix channel iconCloses #211