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

Add Apprise integration

This commit is contained in:
Jean Khawand 2023-08-01 05:55:17 +02:00 committed by GitHub
parent da0198cc0d
commit bf4823bdbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 193 additions and 4 deletions

View file

@ -59,6 +59,9 @@ type IntegrationForm struct {
MatrixBotPassword string
MatrixBotURL string
MatrixBotChatID string
AppriseEnabled bool
AppriseURL string
AppriseServicesURL string
}
// Merge copy form values to the model.
@ -109,6 +112,9 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.MatrixBotPassword = i.MatrixBotPassword
integration.MatrixBotURL = i.MatrixBotURL
integration.MatrixBotChatID = i.MatrixBotChatID
integration.AppriseEnabled = i.AppriseEnabled
integration.AppriseServicesURL = i.AppriseServicesURL
integration.AppriseURL = i.AppriseURL
}
// NewIntegrationForm returns a new IntegrationForm.
@ -162,5 +168,8 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
MatrixBotPassword: r.FormValue("matrix_bot_password"),
MatrixBotURL: r.FormValue("matrix_bot_url"),
MatrixBotChatID: r.FormValue("matrix_bot_chat_id"),
AppriseEnabled: r.FormValue("apprise_enabled") == "1",
AppriseURL: r.FormValue("apprise_url"),
AppriseServicesURL: r.FormValue("apprise_services_url"),
}
}