Skip to content

Commit

Permalink
Don't show form if not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenyeargin committed Jan 31, 2024
1 parent 6b4346d commit eed30f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Controller/MessengerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ public function email(Request $request, EmailService $emailService, Communicatio
#[Route(path: '/sms', name: 'messenger_sms')]
public function sms(Request $request, SmsService $smsService, CommunicationLogService $communicationLogService): Response
{
if (!$smsService->isConfigured()) {
$this->addFlash('danger', 'SMS service not configured!');

return $this->redirectToRoute('messenger_home');
}
$queryRecipients = $this->buildRecipientsFromRequest($request);

$formSMS = $this->createForm(MemberSMSType::class, null, [
Expand Down

0 comments on commit eed30f8

Please sign in to comment.