mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
feat(integration): add ntfy integration
This commit is contained in:
parent
3ca52c7f7f
commit
968355f9b9
32 changed files with 567 additions and 17 deletions
|
@ -36,6 +36,8 @@ type FeedForm struct {
|
|||
CategoryHidden bool // Category has "hide_globally"
|
||||
AppriseServiceURLs string
|
||||
DisableHTTP2 bool
|
||||
NtfyEnabled bool
|
||||
NtfyPriority int
|
||||
}
|
||||
|
||||
// Merge updates the fields of the given feed.
|
||||
|
@ -65,6 +67,8 @@ func (f FeedForm) Merge(feed *model.Feed) *model.Feed {
|
|||
feed.HideGlobally = f.HideGlobally
|
||||
feed.AppriseServiceURLs = f.AppriseServiceURLs
|
||||
feed.DisableHTTP2 = f.DisableHTTP2
|
||||
feed.NtfyEnabled = f.NtfyEnabled
|
||||
feed.NtfyPriority = f.NtfyPriority
|
||||
return feed
|
||||
}
|
||||
|
||||
|
@ -74,6 +78,10 @@ func NewFeedForm(r *http.Request) *FeedForm {
|
|||
if err != nil {
|
||||
categoryID = 0
|
||||
}
|
||||
ntfyPriority, err := strconv.Atoi(r.FormValue("ntfy_priority"))
|
||||
if err != nil {
|
||||
ntfyPriority = 0
|
||||
}
|
||||
return &FeedForm{
|
||||
FeedURL: r.FormValue("feed_url"),
|
||||
SiteURL: r.FormValue("site_url"),
|
||||
|
@ -98,5 +106,7 @@ func NewFeedForm(r *http.Request) *FeedForm {
|
|||
HideGlobally: r.FormValue("hide_globally") == "1",
|
||||
AppriseServiceURLs: r.FormValue("apprise_service_urls"),
|
||||
DisableHTTP2: r.FormValue("disable_http2") == "1",
|
||||
NtfyEnabled: r.FormValue("ntfy_enabled") == "1",
|
||||
NtfyPriority: ntfyPriority,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue