1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

feat(integration): add Slack integration

This commit is contained in:
CaptainArk 2025-01-27 00:20:00 +01:00 committed by Frédéric Guillot
parent bae872e79b
commit fba23cf464
26 changed files with 213 additions and 4 deletions

View file

@ -115,6 +115,8 @@ type IntegrationForm struct {
CuboxAPILink string
DiscordEnabled bool
DiscordWebhookLink string
SlackEnabled bool
SlackWebhookLink string
}
// Merge copy form values to the model.
@ -219,6 +221,8 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.CuboxAPILink = i.CuboxAPILink
integration.DiscordEnabled = i.DiscordEnabled
integration.DiscordWebhookLink = i.DiscordWebhookLink
integration.SlackEnabled = i.SlackEnabled
integration.SlackWebhookLink = i.SlackWebhookLink
}
// NewIntegrationForm returns a new IntegrationForm.
@ -326,6 +330,8 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
CuboxAPILink: r.FormValue("cubox_api_link"),
DiscordEnabled: r.FormValue("discord_enabled") == "1",
DiscordWebhookLink: r.FormValue("discord_webhook_link"),
SlackEnabled: r.FormValue("slack_enabled") == "1",
SlackWebhookLink: r.FormValue("slack_webhook_link"),
}
}