mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
Add matrix bot support
This commit is contained in:
parent
3f14d08095
commit
550e7d0415
28 changed files with 259 additions and 5 deletions
|
@ -48,6 +48,11 @@ type IntegrationForm struct {
|
|||
LinkdingEnabled bool
|
||||
LinkdingURL string
|
||||
LinkdingAPIKey string
|
||||
MatrixBotEnabled bool
|
||||
MatrixBotUser string
|
||||
MatrixBotPassword string
|
||||
MatrixBotURL string
|
||||
MatrixBotChatID string
|
||||
}
|
||||
|
||||
// Merge copy form values to the model.
|
||||
|
@ -86,6 +91,11 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
|
|||
integration.LinkdingEnabled = i.LinkdingEnabled
|
||||
integration.LinkdingURL = i.LinkdingURL
|
||||
integration.LinkdingAPIKey = i.LinkdingAPIKey
|
||||
integration.MatrixBotEnabled = i.MatrixBotEnabled
|
||||
integration.MatrixBotUser = i.MatrixBotUser
|
||||
integration.MatrixBotPassword = i.MatrixBotPassword
|
||||
integration.MatrixBotURL = i.MatrixBotURL
|
||||
integration.MatrixBotChatID = i.MatrixBotChatID
|
||||
}
|
||||
|
||||
// NewIntegrationForm returns a new IntegrationForm.
|
||||
|
@ -127,5 +137,10 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
|
|||
LinkdingEnabled: r.FormValue("linkding_enabled") == "1",
|
||||
LinkdingURL: r.FormValue("linkding_url"),
|
||||
LinkdingAPIKey: r.FormValue("linkding_api_key"),
|
||||
MatrixBotEnabled: r.FormValue("matrix_bot_enabled") == "1",
|
||||
MatrixBotUser: r.FormValue("matrix_bot_user"),
|
||||
MatrixBotPassword: r.FormValue("matrix_bot_password"),
|
||||
MatrixBotURL: r.FormValue("matrix_bot_url"),
|
||||
MatrixBotChatID: r.FormValue("matrix_bot_chat_id"),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue