File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -175,8 +175,14 @@ public function onCheckedIn($event)
175175 // Send Webhook notification
176176 try {
177177 if ($ this ->shouldSendWebhookNotification ()) {
178- Notification::route (Setting::getSettings ()->webhook_selected , Setting::getSettings ()->webhook_endpoint )
179- ->notify ($ this ->getCheckinNotification ($ event ));
178+ if (Setting::getSettings ()->webhook_selected === 'microsoft ' ) {
179+ $ message = $ this ->getCheckinNotification ($ event )->toMicrosoftTeams ();
180+ $ notification = new TeamsNotification (Setting::getSettings ()->webhook_endpoint );
181+ $ notification ->success ()->sendMessage ($ message [0 ], $ message [1 ]); // Send the message to Microsoft Teams
182+ } else {
183+ Notification::route (Setting::getSettings ()->webhook_selected , Setting::getSettings ()->webhook_endpoint )
184+ ->notify ($ this ->getCheckinNotification ($ event , $ acceptance ));
185+ }
180186 }
181187 } catch (ClientException $ e ) {
182188 Log::warning ("Exception caught during checkin notification: " . $ e ->getMessage ());
You can’t perform that action at this time.
0 commit comments