Refactor Discord and Slack Integration Handlers for Improved Data Formatting (#736)

- Moved the instantiation of FormSubmissionFormatter to ensure consistent handling of submission data across both DiscordIntegration and SlackIntegration classes.
- Updated the logic to show hidden fields based on settings, enhancing the flexibility of data presentation in notifications.
- Modified StoreFormSubmissionJob to ensure UUIDs are properly converted to strings, improving data integrity.
- Simplified the redirect URL field check in FormSubmissionProcessor for better readability.

These changes aim to enhance the maintainability and functionality of integration handlers and form submission processing.

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Chirag Chhatrala
2025-04-02 14:40:35 +05:30
committed by GitHub
parent efb2aabe0a
commit 838ab8d846
4 changed files with 16 additions and 14 deletions

View File

@@ -49,7 +49,7 @@ class FormSubmissionProcessor
*/
private function isFieldUsedInRedirectUrl(Form $form, string $fieldId): bool
{
return str_contains($form->redirect_url, '{' . $fieldId . '}');
return str_contains($form->redirect_url, $fieldId);
}
/**