aboutsummaryrefslogtreecommitdiff
path: root/internal/ui/form/integration.go
diff options
context:
space:
mode:
authorGravatar Jany <127505435+janydoe@users.noreply.github.com> 2023-09-28 03:02:22 +0000
committerGravatar GitHub <noreply@github.com> 2023-09-27 20:02:22 -0700
commite0e8a99abe919b8cc2dc292fb8efc2c31f42ad80 (patch)
treed8337842ed96f17e31add109423adfaab3a08a24 /internal/ui/form/integration.go
parentc0e954f19d707fef8ef8271636ec661634a4c4c7 (diff)
downloadv2-e0e8a99abe919b8cc2dc292fb8efc2c31f42ad80.tar.gz
v2-e0e8a99abe919b8cc2dc292fb8efc2c31f42ad80.tar.zst
v2-e0e8a99abe919b8cc2dc292fb8efc2c31f42ad80.zip
Telegram: add the possibility to disable buttons
Closes #2093
Diffstat (limited to 'internal/ui/form/integration.go')
-rw-r--r--internal/ui/form/integration.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/ui/form/integration.go b/internal/ui/form/integration.go
index 9484f122..0d6b4e19 100644
--- a/internal/ui/form/integration.go
+++ b/internal/ui/form/integration.go
@@ -53,6 +53,7 @@ type IntegrationForm struct {
TelegramBotTopicID *int64
TelegramBotDisableWebPagePreview bool
TelegramBotDisableNotification bool
+ TelegramBotDisableButtons bool
LinkdingEnabled bool
LinkdingURL string
LinkdingAPIKey string
@@ -119,6 +120,7 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.TelegramBotTopicID = i.TelegramBotTopicID
integration.TelegramBotDisableWebPagePreview = i.TelegramBotDisableWebPagePreview
integration.TelegramBotDisableNotification = i.TelegramBotDisableNotification
+ integration.TelegramBotDisableButtons = i.TelegramBotDisableButtons
integration.LinkdingEnabled = i.LinkdingEnabled
integration.LinkdingURL = i.LinkdingURL
integration.LinkdingAPIKey = i.LinkdingAPIKey
@@ -187,6 +189,7 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
TelegramBotTopicID: optionalInt64Field(r.FormValue("telegram_bot_topic_id")),
TelegramBotDisableWebPagePreview: r.FormValue("telegram_bot_disable_web_page_preview") == "1",
TelegramBotDisableNotification: r.FormValue("telegram_bot_disable_notification") == "1",
+ TelegramBotDisableButtons: r.FormValue("telegram_bot_disable_buttons") == "1",
LinkdingEnabled: r.FormValue("linkding_enabled") == "1",
LinkdingURL: r.FormValue("linkding_url"),
LinkdingAPIKey: r.FormValue("linkding_api_key"),