mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Matrix txnid fix (#12057)
* Fix Matrix alerting txnid This fixes the issue I brought up in #12018. I can confirm that I now get a new message from the LibreNMS bot every time I test my Matrix transport. * Update AUTHORS.md
This commit is contained in:
@@ -43,9 +43,10 @@ class Matrix extends Transport
|
||||
{
|
||||
$request_opts = [];
|
||||
$request_heads = [];
|
||||
$txnid = rand(1111, 9999) . time();
|
||||
|
||||
$server = preg_replace('/\/$/', '', $server);
|
||||
$host = $server."/_matrix/client/r0/rooms/".urlencode($room)."/send/m.room.message/".$obj['uid'];
|
||||
$host = $server."/_matrix/client/r0/rooms/".urlencode($room)."/send/m.room.message/".$txnid;
|
||||
|
||||
$request_heads['Authorization'] = "Bearer $authtoken";
|
||||
$request_heads['Content-Type'] = "application/json";
|
||||
|
Reference in New Issue
Block a user