mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
Add Telegram integration
This commit is contained in:
parent
93596c1218
commit
34dd358eb0
25 changed files with 173 additions and 4 deletions
|
@ -34,6 +34,9 @@ type IntegrationForm struct {
|
|||
PocketEnabled bool
|
||||
PocketAccessToken string
|
||||
PocketConsumerKey string
|
||||
TelegramBotEnabled bool
|
||||
TelegramBotToken string
|
||||
TelegramBotChatID string
|
||||
}
|
||||
|
||||
// Merge copy form values to the model.
|
||||
|
@ -59,6 +62,9 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
|
|||
integration.PocketEnabled = i.PocketEnabled
|
||||
integration.PocketAccessToken = i.PocketAccessToken
|
||||
integration.PocketConsumerKey = i.PocketConsumerKey
|
||||
integration.TelegramBotEnabled = i.TelegramBotEnabled
|
||||
integration.TelegramBotToken = i.TelegramBotToken
|
||||
integration.TelegramBotChatID = i.TelegramBotChatID
|
||||
}
|
||||
|
||||
// NewIntegrationForm returns a new AuthForm.
|
||||
|
@ -86,5 +92,8 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
|
|||
PocketEnabled: r.FormValue("pocket_enabled") == "1",
|
||||
PocketAccessToken: r.FormValue("pocket_access_token"),
|
||||
PocketConsumerKey: r.FormValue("pocket_consumer_key"),
|
||||
TelegramBotEnabled: r.FormValue("telegram_bot_enabled") == "1",
|
||||
TelegramBotToken: r.FormValue("telegram_bot_token"),
|
||||
TelegramBotChatID: r.FormValue("telegram_bot_chat_id"),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue