From 2e52518aa770a7f532ebfd35bb4fc718dd5211fc Mon Sep 17 00:00:00 2001 From: formsdev <136701234+formsdev@users.noreply.github.com> Date: Fri, 27 Oct 2023 13:48:08 +0530 Subject: [PATCH] fix submission confirmation mail submission_id (#230) * fix submission confirmation mail submission_id * fix condition --- app/Mail/Forms/SubmissionConfirmationMail.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Mail/Forms/SubmissionConfirmationMail.php b/app/Mail/Forms/SubmissionConfirmationMail.php index 4ea01a3..6532e94 100644 --- a/app/Mail/Forms/SubmissionConfirmationMail.php +++ b/app/Mail/Forms/SubmissionConfirmationMail.php @@ -10,6 +10,7 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Str; use Illuminate\Support\Arr; +use Vinkla\Hashids\Facades\Hashids; class SubmissionConfirmationMail extends OpenFormMail implements ShouldQueue { @@ -44,7 +45,7 @@ class SubmissionConfirmationMail extends OpenFormMail implements ShouldQueue 'fields' => $formatter->getFieldsWithValue(), 'form' => $form, 'noBranding' => $form->no_branding, - 'submission_id' => $this->event->data['submission_id'] ?? null + 'submission_id' => (isset($this->event->data['submission_id']) && $this->event->data['submission_id']) ? Hashids::encode($this->event->data['submission_id']) : null ]); }