fix: slack channel
This commit is contained in:
committed by
Stefan Stidl
parent
ff480a7247
commit
ad8c36a51a
@@ -96,6 +96,7 @@ class CheckoutAssetNotification extends Notification
|
||||
$item = $this->item;
|
||||
$note = $this->note;
|
||||
$botname = ($this->settings->webhook_botname) ? $this->settings->webhook_botname : 'Snipe-Bot';
|
||||
$channel = ($this->settings->webhook_channel) ? $this->settings->webhook_channel : '';
|
||||
|
||||
$fields = [
|
||||
'To' => '<'.$target->present()->viewUrl().'|'.$target->present()->fullName().'>',
|
||||
@@ -109,6 +110,7 @@ class CheckoutAssetNotification extends Notification
|
||||
return (new SlackMessage)
|
||||
->content(':arrow_up: :computer: '.trans('mail.Asset_Checkout_Notification'))
|
||||
->from($botname)
|
||||
->to($channel)
|
||||
->attachment(function ($attachment) use ($item, $note, $admin, $fields) {
|
||||
$attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())
|
||||
->fields($fields)
|
||||
|
||||
Reference in New Issue
Block a user