mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Check for admin for slack notifications
This commit is contained in:
parent
e52919cf1b
commit
b5acca89d7
|
@ -76,10 +76,18 @@ class CheckinLicenseNotification extends Notification
|
||||||
$botname = ($this->settings->slack_botname) ? $this->settings->slack_botname : 'Snipe-Bot' ;
|
$botname = ($this->settings->slack_botname) ? $this->settings->slack_botname : 'Snipe-Bot' ;
|
||||||
|
|
||||||
|
|
||||||
$fields = [
|
if ($admin) {
|
||||||
'To' => '<'.$target->present()->viewUrl().'|'.$target->present()->fullName().'>',
|
$fields = [
|
||||||
'By' => '<'.$admin->present()->viewUrl().'|'.$admin->present()->fullName().'>',
|
'To' => '<'.$target->present()->viewUrl().'|'.$target->present()->fullName().'>',
|
||||||
];
|
'By' => '<'.$admin->present()->viewUrl().'|'.$admin->present()->fullName().'>',
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
$fields = [
|
||||||
|
'To' => '<'.$target->present()->viewUrl().'|'.$target->present()->fullName().'>',
|
||||||
|
'By' => 'CLI tool',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue