mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user