1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-02 16:38:37 +00:00

feat(integration): add Discord integration

This commit is contained in:
CaptainArk 2025-01-12 21:18:57 +01:00 committed by GitHub
parent f116f7dd6a
commit 9b25ea4ed6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 209 additions and 4 deletions

View file

@ -112,6 +112,8 @@ type IntegrationForm struct {
NtfyIconURL string
CuboxEnabled bool
CuboxAPILink string
DiscordEnabled bool
DiscordWebhookLink string
}
// Merge copy form values to the model.
@ -213,6 +215,8 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.NtfyIconURL = i.NtfyIconURL
integration.CuboxEnabled = i.CuboxEnabled
integration.CuboxAPILink = i.CuboxAPILink
integration.DiscordEnabled = i.DiscordEnabled
integration.DiscordWebhookLink = i.DiscordWebhookLink
}
// NewIntegrationForm returns a new IntegrationForm.
@ -317,6 +321,8 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
NtfyIconURL: r.FormValue("ntfy_icon_url"),
CuboxEnabled: r.FormValue("cubox_enabled") == "1",
CuboxAPILink: r.FormValue("cubox_api_link"),
DiscordEnabled: r.FormValue("discord_enabled") == "1",
DiscordWebhookLink: r.FormValue("discord_webhook_link"),
}
}