fix: slack channel

This commit is contained in:
Stefan Stidl
2023-06-02 11:59:47 +02:00
committed by Stefan Stidl
parent ff480a7247
commit ad8c36a51a
10 changed files with 22 additions and 0 deletions
@@ -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)