Matrix: critical alerts now notify (#16355)

* Update Matrix.php

Changing 'm.text' to 'm.notice' so that when an alert is issued, you get notified on your Matrix client.

The current 'm.text' parameter will silently send you the message, whereas 'm.notice' will send you a message with an alert.

* Enabling notifications on Matrix client

Changing 'm.text' to 'm.notice' (line 47) so that when an alert is issued, you get notified on your Matrix client.

The current 'm.text' parameter will silently send you a message, whereas 'm.notice' will send you a message with an alert.

* Update Matrix.php

* Update Matrix.php

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
jcamos 2024-09-12 16:13:21 +01:00 committed by GitHub
parent f7142980d2
commit 4c72856046
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,7 +44,7 @@ class Matrix extends Transport
$message = SimpleTemplate::parse($message, $alert_data);
$body = ['body' => strip_tags($message), 'formatted_body' => "$message", 'msgtype' => 'm.text', 'format' => 'org.matrix.custom.html'];
$body = ['body' => strip_tags($message), 'formatted_body' => "$message", 'msgtype' => 'm.notice', 'format' => 'org.matrix.custom.html'];
$res = Http::client()
->withToken($authtoken)