[Added] Discord Webhook Notification (#81) (#83)

* [Feature] Added Discord Webhook feature to forms

* Remove commented out svg

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Leonard Selvaraja
2023-02-19 17:49:16 +05:30
committed by GitHub
parent eb3a11c992
commit b101a5daba
8 changed files with 209 additions and 7 deletions

View File

@@ -39,6 +39,7 @@ class Form extends Model
'notification_body',
'notifications_include_submission',
'slack_webhook_url',
'discord_webhook_url',
// integrations
'webhook_url',
@@ -98,6 +99,7 @@ class Form extends Model
'workspace_id',
'notifies',
'slack_webhook_url',
'discord_webhook_url',
'webhook_url',
'send_submission_confirmation',
'redirect_url',
@@ -250,6 +252,12 @@ class Form extends Model
return FormFactory::new();
}
public function getNotifiesDiscordAttribute()
{
return !empty($this->discord_webhook_url);
}
public function getNotifiesSlackAttribute()
{
return !empty($this->slack_webhook_url);