From 3d5d9574e359616edea21d325c403174f58707fc Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser Date: Fri, 29 Nov 2024 00:04:46 -0800 Subject: [PATCH] feat: Add webhook profile picture support - Added `webhookBotProfilePicture` field to `TeamDiscordIntegrationSchema`. - Updated `DiscordIntegrationForm.vue` to include profile picture input. - Created migration to add `webhook_bot_profile_picture` column. - Updated `Team` model to handle new profile picture field. - Modified `TeamDiscordIntegration` and `TeamDiscordIntegrationSchema` to include the new profile picture attribute. --- .../models/TeamDiscordIntegrationSchema.ts | 1 + .../src/components/DiscordIntegrationForm.vue | 5 +++ ...242e3f99c64_add_webhook_profile_picture.py | 32 +++++++++++++++++++ backend-flask/models/team.py | 5 ++- backend-flask/models/team_integration.py | 4 +++ 5 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 backend-flask/migrations/versions/c242e3f99c64_add_webhook_profile_picture.py diff --git a/availabili.tf/src/client/models/TeamDiscordIntegrationSchema.ts b/availabili.tf/src/client/models/TeamDiscordIntegrationSchema.ts index 32b5241..3657f8e 100644 --- a/availabili.tf/src/client/models/TeamDiscordIntegrationSchema.ts +++ b/availabili.tf/src/client/models/TeamDiscordIntegrationSchema.ts @@ -4,6 +4,7 @@ /* eslint-disable */ export type TeamDiscordIntegrationSchema = { webhookBotName: string; + webhookBotProfilePicture: (string | null); webhookUrl: string; }; diff --git a/availabili.tf/src/components/DiscordIntegrationForm.vue b/availabili.tf/src/components/DiscordIntegrationForm.vue index 0eee1b8..af68f47 100644 --- a/availabili.tf/src/components/DiscordIntegrationForm.vue +++ b/availabili.tf/src/components/DiscordIntegrationForm.vue @@ -16,6 +16,7 @@ function enableIntegration() { model.value = { webhookUrl: "", webhookBotName: "", + webhookBotProfilePicture: null, }; saveIntegration(); } @@ -38,6 +39,10 @@ function disableIntegration() {

Webhook Bot Name

+
+

Webhook Bot Profile Picture URL (optional)

+ +