1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-22 17:18:37 +00:00

feat(integrations/ntfy): make ntfy topics configurable per feed, with default one as fallback

This commit is contained in:
Uziskull 2025-02-24 01:41:51 +00:00
parent 3b8ac8b16a
commit 80ca9b240b
27 changed files with 69 additions and 23 deletions

View file

@ -67,6 +67,7 @@ func (h *handler) showEditFeedPage(w http.ResponseWriter, r *http.Request) {
DisableHTTP2: feed.DisableHTTP2,
NtfyEnabled: feed.NtfyEnabled,
NtfyPriority: feed.NtfyPriority,
NtfyTopic: feed.NtfyTopic,
PushoverEnabled: feed.PushoverEnabled,
PushoverPriority: feed.PushoverPriority,
}

View file

@ -39,6 +39,7 @@ type FeedForm struct {
DisableHTTP2 bool
NtfyEnabled bool
NtfyPriority int
NtfyTopic string
PushoverEnabled bool
PushoverPriority int
}
@ -73,6 +74,7 @@ func (f FeedForm) Merge(feed *model.Feed) *model.Feed {
feed.DisableHTTP2 = f.DisableHTTP2
feed.NtfyEnabled = f.NtfyEnabled
feed.NtfyPriority = f.NtfyPriority
feed.NtfyTopic = f.NtfyTopic
feed.PushoverEnabled = f.PushoverEnabled
feed.PushoverPriority = f.PushoverPriority
return feed
@ -121,6 +123,7 @@ func NewFeedForm(r *http.Request) *FeedForm {
DisableHTTP2: r.FormValue("disable_http2") == "1",
NtfyEnabled: r.FormValue("ntfy_enabled") == "1",
NtfyPriority: ntfyPriority,
NtfyTopic: r.FormValue("ntfy_topic"),
PushoverEnabled: r.FormValue("pushover_enabled") == "1",
PushoverPriority: pushoverPriority,
}