1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-26 18:21:01 +00:00

feat(pushover): add integration with pushover.net

This commit is contained in:
Sergio Moura 2025-02-12 13:05:28 -05:00 committed by Frédéric Guillot
parent 76acd81fa4
commit 3387201634
32 changed files with 510 additions and 6 deletions

View file

@ -117,6 +117,11 @@ type IntegrationForm struct {
DiscordWebhookLink string
SlackEnabled bool
SlackWebhookLink string
PushoverEnabled bool
PushoverUser string
PushoverToken string
PushoverDevice string
PushoverPrefix string
}
// Merge copy form values to the model.
@ -223,6 +228,11 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.DiscordWebhookLink = i.DiscordWebhookLink
integration.SlackEnabled = i.SlackEnabled
integration.SlackWebhookLink = i.SlackWebhookLink
integration.PushoverEnabled = i.PushoverEnabled
integration.PushoverUser = i.PushoverUser
integration.PushoverToken = i.PushoverToken
integration.PushoverDevice = i.PushoverDevice
integration.PushoverPrefix = i.PushoverPrefix
}
// NewIntegrationForm returns a new IntegrationForm.
@ -332,6 +342,11 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
DiscordWebhookLink: r.FormValue("discord_webhook_link"),
SlackEnabled: r.FormValue("slack_enabled") == "1",
SlackWebhookLink: r.FormValue("slack_webhook_link"),
PushoverEnabled: r.FormValue("pushover_enabled") == "1",
PushoverUser: r.FormValue("pushover_user"),
PushoverToken: r.FormValue("pushover_token"),
PushoverDevice: r.FormValue("pushover_device"),
PushoverPrefix: r.FormValue("pushover_prefix"),
}
}