File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -102,10 +102,6 @@ public function onCheckedOut($event)
102102 $ message = $ this ->getCheckoutNotification ($ event )->toMicrosoftTeams ();
103103 $ notification = new TeamsNotification (Setting::getSettings ()->webhook_endpoint );
104104 $ notification ->success ()->sendMessage ($ message [0 ], $ message [1 ]); // Send the message to Microsoft Teams
105- } else {
106-
107- Notification::route ($ this ->webhookSelected (), Setting::getSettings ()->webhook_endpoint )
108- ->notify ($ this ->getCheckoutNotification ($ event , $ acceptance ));
109105 }
110106 }
111107 } catch (ClientException $ e ) {
@@ -196,12 +192,12 @@ public function onCheckedIn($event)
196192 try {
197193 if ($ this ->shouldSendWebhookNotification ()) {
198194 if ($ this ->newMicrosoftTeamsWebhookEnabled ()) {
195+ if (!Str::contains (Setting::getSettings ()->webhook_endpoint , 'workflows ' )){
196+ return redirect ()->back ()->with ('warning ' ,trans ('admin/settings/message.webhook.webhook_fail ' ));
197+ }
199198 $ message = $ this ->getCheckinNotification ($ event )->toMicrosoftTeams ();
200199 $ notification = new TeamsNotification (Setting::getSettings ()->webhook_endpoint );
201200 $ notification ->success ()->sendMessage ($ message [0 ], $ message [1 ]); // Send the message to Microsoft Teams
202- } else {
203- Notification::route ($ this ->webhookSelected (), Setting::getSettings ()->webhook_endpoint )
204- ->notify ($ this ->getCheckinNotification ($ event ));
205201 }
206202 }
207203 } catch (ClientException $ e ) {
You can’t perform that action at this time.
0 commit comments