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:
parent
3b8ac8b16a
commit
80ca9b240b
27 changed files with 69 additions and 23 deletions
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue