Pushover
diff --git a/internal/ui/form/integration.go b/internal/ui/form/integration.go
index 7f35fd99..170043e4 100644
--- a/internal/ui/form/integration.go
+++ b/internal/ui/form/integration.go
@@ -44,9 +44,6 @@ type IntegrationForm struct {
EspialTags string
ReadwiseEnabled bool
ReadwiseAPIKey string
- PocketEnabled bool
- PocketAccessToken string
- PocketConsumerKey string
TelegramBotEnabled bool
TelegramBotToken string
TelegramBotChatID string
@@ -160,9 +157,6 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.EspialTags = i.EspialTags
integration.ReadwiseEnabled = i.ReadwiseEnabled
integration.ReadwiseAPIKey = i.ReadwiseAPIKey
- integration.PocketEnabled = i.PocketEnabled
- integration.PocketAccessToken = i.PocketAccessToken
- integration.PocketConsumerKey = i.PocketConsumerKey
integration.TelegramBotEnabled = i.TelegramBotEnabled
integration.TelegramBotToken = i.TelegramBotToken
integration.TelegramBotChatID = i.TelegramBotChatID
@@ -278,9 +272,6 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
EspialTags: r.FormValue("espial_tags"),
ReadwiseEnabled: r.FormValue("readwise_enabled") == "1",
ReadwiseAPIKey: r.FormValue("readwise_api_key"),
- 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"),
diff --git a/internal/ui/integration_pocket.go b/internal/ui/integration_pocket.go
deleted file mode 100644
index 13e17295..00000000
--- a/internal/ui/integration_pocket.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
-// SPDX-License-Identifier: Apache-2.0
-
-package ui // import "miniflux.app/v2/internal/ui"
-
-import (
- "log/slog"
- "net/http"
-
- "miniflux.app/v2/internal/config"
- "miniflux.app/v2/internal/http/request"
- "miniflux.app/v2/internal/http/response/html"
- "miniflux.app/v2/internal/http/route"
- "miniflux.app/v2/internal/integration/pocket"
- "miniflux.app/v2/internal/locale"
- "miniflux.app/v2/internal/ui/session"
-)
-
-func (h *handler) pocketAuthorize(w http.ResponseWriter, r *http.Request) {
- printer := locale.NewPrinter(request.UserLanguage(r))
- user, err := h.store.UserByID(request.UserID(r))
- if err != nil {
- html.ServerError(w, r, err)
- return
- }
-
- integration, err := h.store.Integration(user.ID)
- if err != nil {
- html.ServerError(w, r, err)
- return
- }
-
- sess := session.New(h.store, request.SessionID(r))
- connector := pocket.NewConnector(config.Opts.PocketConsumerKey(integration.PocketConsumerKey))
- redirectURL := config.Opts.RootURL() + route.Path(h.router, "pocketCallback")
- requestToken, err := connector.RequestToken(redirectURL)
- if err != nil {
- slog.Warn("Pocket authorization request failed",
- slog.Any("user_id", user.ID),
- slog.Any("error", err),
- )
- sess.NewFlashErrorMessage(printer.Print("error.pocket_request_token"))
- html.Redirect(w, r, route.Path(h.router, "integrations"))
- return
- }
-
- sess.SetPocketRequestToken(requestToken)
- html.Redirect(w, r, connector.AuthorizationURL(requestToken, redirectURL))
-}
-
-func (h *handler) pocketCallback(w http.ResponseWriter, r *http.Request) {
- printer := locale.NewPrinter(request.UserLanguage(r))
- sess := session.New(h.store, request.SessionID(r))
-
- user, err := h.store.UserByID(request.UserID(r))
- if err != nil {
- html.ServerError(w, r, err)
- return
- }
-
- integration, err := h.store.Integration(user.ID)
- if err != nil {
- html.ServerError(w, r, err)
- return
- }
-
- connector := pocket.NewConnector(config.Opts.PocketConsumerKey(integration.PocketConsumerKey))
- accessToken, err := connector.AccessToken(request.PocketRequestToken(r))
- if err != nil {
- slog.Warn("Unable to get Pocket access token",
- slog.Any("user_id", user.ID),
- slog.Any("error", err),
- )
- sess.NewFlashErrorMessage(printer.Print("error.pocket_access_token"))
- html.Redirect(w, r, route.Path(h.router, "integrations"))
- return
- }
-
- sess.SetPocketRequestToken("")
- integration.PocketAccessToken = accessToken
-
- err = h.store.UpdateIntegration(integration)
- if err != nil {
- html.ServerError(w, r, err)
- return
- }
-
- sess.NewFlashMessage(printer.Print("alert.pocket_linked"))
- html.Redirect(w, r, route.Path(h.router, "integrations"))
-}
diff --git a/internal/ui/integration_show.go b/internal/ui/integration_show.go
index 95070c10..afd2571e 100644
--- a/internal/ui/integration_show.go
+++ b/internal/ui/integration_show.go
@@ -6,7 +6,6 @@ package ui // import "miniflux.app/v2/internal/ui"
import (
"net/http"
- "miniflux.app/v2/internal/config"
"miniflux.app/v2/internal/http/request"
"miniflux.app/v2/internal/http/response/html"
"miniflux.app/v2/internal/ui/form"
@@ -58,9 +57,6 @@ func (h *handler) showIntegrationPage(w http.ResponseWriter, r *http.Request) {
EspialTags: integration.EspialTags,
ReadwiseEnabled: integration.ReadwiseEnabled,
ReadwiseAPIKey: integration.ReadwiseAPIKey,
- PocketEnabled: integration.PocketEnabled,
- PocketAccessToken: integration.PocketAccessToken,
- PocketConsumerKey: integration.PocketConsumerKey,
TelegramBotEnabled: integration.TelegramBotEnabled,
TelegramBotToken: integration.TelegramBotToken,
TelegramBotChatID: integration.TelegramBotChatID,
@@ -149,7 +145,6 @@ func (h *handler) showIntegrationPage(w http.ResponseWriter, r *http.Request) {
view.Set("user", user)
view.Set("countUnread", h.store.CountUnreadEntries(user.ID))
view.Set("countErrorFeeds", h.store.CountUserFeedsWithErrors(user.ID))
- view.Set("hasPocketConsumerKeyConfigured", config.Opts.PocketConsumerKey("") != "")
html.OK(w, r, view.Render("integrations"))
}
diff --git a/internal/ui/middleware.go b/internal/ui/middleware.go
index 17f6f16d..4a16b60f 100644
--- a/internal/ui/middleware.go
+++ b/internal/ui/middleware.go
@@ -126,7 +126,6 @@ func (m *middleware) handleAppSession(next http.Handler) http.Handler {
ctx = context.WithValue(ctx, request.FlashErrorMessageContextKey, session.Data.FlashErrorMessage)
ctx = context.WithValue(ctx, request.UserLanguageContextKey, session.Data.Language)
ctx = context.WithValue(ctx, request.UserThemeContextKey, session.Data.Theme)
- ctx = context.WithValue(ctx, request.PocketRequestTokenContextKey, session.Data.PocketRequestToken)
ctx = context.WithValue(ctx, request.LastForceRefreshContextKey, session.Data.LastForceRefresh)
ctx = context.WithValue(ctx, request.WebAuthnDataContextKey, session.Data.WebAuthnSessionData)
next.ServeHTTP(w, r.WithContext(ctx))
diff --git a/internal/ui/session/session.go b/internal/ui/session/session.go
index ef43d6c8..6466f716 100644
--- a/internal/ui/session/session.go
+++ b/internal/ui/session/session.go
@@ -69,11 +69,6 @@ func (s *Session) SetTheme(theme string) {
s.store.UpdateAppSessionField(s.sessionID, "theme", theme)
}
-// SetPocketRequestToken updates Pocket Request Token.
-func (s *Session) SetPocketRequestToken(requestToken string) {
- s.store.UpdateAppSessionField(s.sessionID, "pocket_request_token", requestToken)
-}
-
func (s *Session) SetWebAuthnSessionData(sessionData *model.WebAuthnSession) {
s.store.UpdateAppSessionObjectField(s.sessionID, "webauthn_session_data", sessionData)
}
diff --git a/internal/ui/ui.go b/internal/ui/ui.go
index 32e39529..d70d4883 100644
--- a/internal/ui/ui.go
+++ b/internal/ui/ui.go
@@ -126,8 +126,6 @@ func Serve(router *mux.Router, store *storage.Storage, pool *worker.Pool) {
uiRouter.HandleFunc("/settings", handler.updateSettings).Name("updateSettings").Methods(http.MethodPost)
uiRouter.HandleFunc("/integrations", handler.showIntegrationPage).Name("integrations").Methods(http.MethodGet)
uiRouter.HandleFunc("/integration", handler.updateIntegration).Name("updateIntegration").Methods(http.MethodPost)
- uiRouter.HandleFunc("/integration/pocket/authorize", handler.pocketAuthorize).Name("pocketAuthorize").Methods(http.MethodGet)
- uiRouter.HandleFunc("/integration/pocket/callback", handler.pocketCallback).Name("pocketCallback").Methods(http.MethodGet)
uiRouter.HandleFunc("/about", handler.showAboutPage).Name("about").Methods(http.MethodGet)
// Session pages.
diff --git a/miniflux.1 b/miniflux.1
index 0cba7ccf..c18b0174 100644
--- a/miniflux.1
+++ b/miniflux.1
@@ -1,5 +1,5 @@
.\" Manpage for miniflux.
-.TH "MINIFLUX" "1" "April 11, 2025" "\ \&" "\ \&"
+.TH "MINIFLUX" "1" "June 15, 2025" "\ \&" "\ \&"
.SH NAME
miniflux \- Minimalist and opinionated feed reader
@@ -483,16 +483,6 @@ Set to 1 to authorize OAuth2 user creation\&.
.br
Disabled by default\&.
.TP
-.B POCKET_CONSUMER_KEY
-Pocket consumer API key for all users\&.
-.br
-Default is empty\&.
-.TP
-.B POCKET_CONSUMER_KEY_FILE
-Path to a secret key exposed as a file, it should contain $POCKET_CONSUMER_KEY value\&.
-.br
-Default is empty\&.
-.TP
.B POLLING_FREQUENCY
Refresh interval in minutes for feeds\&.
.br