mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Update Mattermost transport with configurable author_name (#9759)
Signed-off-by: Misha Komarovskiy <zombah@gmail.com>
This commit is contained in:
committed by
Tony Murray
parent
2f8964ce27
commit
fe4bd2b338
@@ -38,6 +38,7 @@ class Mattermost extends Transport
|
||||
'username' => $this->config['mattermost-username'],
|
||||
'icon' => $this->config['mattermost-icon'],
|
||||
'channel' => $this->config['mattermost-channel'],
|
||||
'author_name' => $this->config['mattermost-author_name'],
|
||||
];
|
||||
|
||||
return $this->contactMattermost($obj, $mattermost_opts);
|
||||
@@ -65,7 +66,7 @@ class Mattermost extends Transport
|
||||
'title' => $obj['title'],
|
||||
'text' => $obj['msg'],
|
||||
'mrkdwn_in' => ['text', 'fallback'],
|
||||
'author_name' => $obj['hostname'],
|
||||
'author_name' => $api['author_name'],
|
||||
],
|
||||
],
|
||||
'channel' => $api['channel'],
|
||||
@@ -125,6 +126,12 @@ class Mattermost extends Transport
|
||||
'descr' => 'Icon URL',
|
||||
'type' => 'text',
|
||||
],
|
||||
[
|
||||
'title' => 'Author_name',
|
||||
'name' => 'mattermost-author_name',
|
||||
'descr' => 'Optional name used to identify the author',
|
||||
'type' => 'text',
|
||||
],
|
||||
],
|
||||
'validation' => [
|
||||
'mattermost-url' => 'required|url',
|
||||
|
||||
Reference in New Issue
Block a user