Skip to content

Commit 0f63fa2

Browse files
committed
Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <[email protected]> # Conflicts: # package-lock.json
2 parents bda6fdf + 22ef569 commit 0f63fa2

7 files changed

+9758
-288
lines changed

app/Notifications/CheckinAccessoryNotification.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ public function __construct(Accessory $accessory, $checkedOutTo, User $checkedIn
4343
public function via()
4444
{
4545
$notifyBy = [];
46-
if (Setting::getSettings()->webhook_selected == 'google'){
46+
if (Setting::getSettings()->webhook_selected == 'google' && Setting::getSettings()->webhook_endpoint) {
4747

4848
$notifyBy[] = GoogleChatChannel::class;
4949
}
5050

51-
if (Setting::getSettings()->webhook_selected == 'microsoft'){
51+
if (Setting::getSettings()->webhook_selected == 'microsoft' && Setting::getSettings()->webhook_endpoint) {
5252

5353
$notifyBy[] = MicrosoftTeamsChannel::class;
5454
}

app/Notifications/CheckinAssetNotification.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ public function __construct(Asset $asset, $checkedOutTo, User $checkedInBy, $not
5151
public function via()
5252
{
5353
$notifyBy = [];
54-
if (Setting::getSettings()->webhook_selected == 'google'){
54+
if (Setting::getSettings()->webhook_selected == 'google' && Setting::getSettings()->webhook_endpoint) {
5555

5656
$notifyBy[] = GoogleChatChannel::class;
5757
}
5858

59-
if (Setting::getSettings()->webhook_selected == 'microsoft'){
59+
if (Setting::getSettings()->webhook_selected == 'microsoft' && Setting::getSettings()->webhook_endpoint) {
6060

6161
$notifyBy[] = MicrosoftTeamsChannel::class;
6262
}

app/Notifications/CheckinLicenseSeatNotification.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ public function via()
4848
{
4949
$notifyBy = [];
5050

51-
if (Setting::getSettings()->webhook_selected == 'google'){
51+
if (Setting::getSettings()->webhook_selected == 'google' && Setting::getSettings()->webhook_endpoint) {
5252

5353
$notifyBy[] = GoogleChatChannel::class;
5454
}
55-
if (Setting::getSettings()->webhook_selected == 'microsoft'){
55+
if (Setting::getSettings()->webhook_selected == 'microsoft' && Setting::getSettings()->webhook_endpoint) {
5656

5757
$notifyBy[] = MicrosoftTeamsChannel::class;
5858
}

app/Notifications/CheckoutAccessoryNotification.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ public function __construct(Accessory $accessory, $checkedOutTo, User $checkedOu
4242
public function via()
4343
{
4444
$notifyBy = [];
45-
if (Setting::getSettings()->webhook_selected == 'google'){
45+
if (Setting::getSettings()->webhook_selected == 'google' && Setting::getSettings()->webhook_endpoint) {
4646

4747
$notifyBy[] = GoogleChatChannel::class;
4848
}
4949

50-
if (Setting::getSettings()->webhook_selected == 'microsoft'){
50+
if (Setting::getSettings()->webhook_selected == 'microsoft' && Setting::getSettings()->webhook_endpoint) {
5151

5252
$notifyBy[] = MicrosoftTeamsChannel::class;
5353
}

app/Notifications/CheckoutAssetNotification.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ public function __construct(Asset $asset, $checkedOutTo, User $checkedOutBy, $ac
6262
public function via()
6363
{
6464
$notifyBy = [];
65-
if (Setting::getSettings()->webhook_selected == 'google'){
65+
if (Setting::getSettings()->webhook_selected == 'google' && Setting::getSettings()->webhook_endpoint) {
6666

6767
$notifyBy[] = GoogleChatChannel::class;
6868
}
6969

70-
if (Setting::getSettings()->webhook_selected == 'microsoft'){
70+
if (Setting::getSettings()->webhook_selected == 'microsoft' && Setting::getSettings()->webhook_endpoint) {
7171

7272
$notifyBy[] = MicrosoftTeamsChannel::class;
7373
}

app/Notifications/CheckoutConsumableNotification.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ public function __construct(Consumable $consumable, $checkedOutTo, User $checked
4949
public function via()
5050
{
5151
$notifyBy = [];
52-
if (Setting::getSettings()->webhook_selected == 'google'){
52+
if (Setting::getSettings()->webhook_selected == 'google' && Setting::getSettings()->webhook_endpoint) {
5353

5454
$notifyBy[] = GoogleChatChannel::class;
5555
}
5656

57-
if (Setting::getSettings()->webhook_selected == 'microsoft'){
57+
if (Setting::getSettings()->webhook_selected == 'microsoft' && Setting::getSettings()->webhook_endpoint) {
5858

5959
$notifyBy[] = MicrosoftTeamsChannel::class;
6060
}

0 commit comments

Comments
 (0)