Raindrop
diff --git a/internal/ui/feed_edit.go b/internal/ui/feed_edit.go
index a6962600..9fd33976 100644
--- a/internal/ui/feed_edit.go
+++ b/internal/ui/feed_edit.go
@@ -67,6 +67,8 @@ func (h *handler) showEditFeedPage(w http.ResponseWriter, r *http.Request) {
DisableHTTP2: feed.DisableHTTP2,
NtfyEnabled: feed.NtfyEnabled,
NtfyPriority: feed.NtfyPriority,
+ PushoverEnabled: feed.PushoverEnabled,
+ PushoverPriority: feed.PushoverPriority,
}
sess := session.New(h.store, request.SessionID(r))
diff --git a/internal/ui/form/feed.go b/internal/ui/form/feed.go
index 8212e910..93c2c058 100644
--- a/internal/ui/form/feed.go
+++ b/internal/ui/form/feed.go
@@ -39,6 +39,8 @@ type FeedForm struct {
DisableHTTP2 bool
NtfyEnabled bool
NtfyPriority int
+ PushoverEnabled bool
+ PushoverPriority int
}
// Merge updates the fields of the given feed.
@@ -71,6 +73,8 @@ func (f FeedForm) Merge(feed *model.Feed) *model.Feed {
feed.DisableHTTP2 = f.DisableHTTP2
feed.NtfyEnabled = f.NtfyEnabled
feed.NtfyPriority = f.NtfyPriority
+ feed.PushoverEnabled = f.PushoverEnabled
+ feed.PushoverPriority = f.PushoverPriority
return feed
}
@@ -84,6 +88,12 @@ func NewFeedForm(r *http.Request) *FeedForm {
if err != nil {
ntfyPriority = 0
}
+
+ pushoverPriority, err := strconv.Atoi(r.FormValue("pushover_priority"))
+ if err != nil {
+ pushoverPriority = 0
+ }
+
return &FeedForm{
FeedURL: r.FormValue("feed_url"),
SiteURL: r.FormValue("site_url"),
@@ -111,5 +121,7 @@ func NewFeedForm(r *http.Request) *FeedForm {
DisableHTTP2: r.FormValue("disable_http2") == "1",
NtfyEnabled: r.FormValue("ntfy_enabled") == "1",
NtfyPriority: ntfyPriority,
+ PushoverEnabled: r.FormValue("pushover_enabled") == "1",
+ PushoverPriority: pushoverPriority,
}
}
diff --git a/internal/ui/form/integration.go b/internal/ui/form/integration.go
index 25b0b3e7..5a8ef9f1 100644
--- a/internal/ui/form/integration.go
+++ b/internal/ui/form/integration.go
@@ -117,6 +117,11 @@ type IntegrationForm struct {
DiscordWebhookLink string
SlackEnabled bool
SlackWebhookLink string
+ PushoverEnabled bool
+ PushoverUser string
+ PushoverToken string
+ PushoverDevice string
+ PushoverPrefix string
}
// Merge copy form values to the model.
@@ -223,6 +228,11 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.DiscordWebhookLink = i.DiscordWebhookLink
integration.SlackEnabled = i.SlackEnabled
integration.SlackWebhookLink = i.SlackWebhookLink
+ integration.PushoverEnabled = i.PushoverEnabled
+ integration.PushoverUser = i.PushoverUser
+ integration.PushoverToken = i.PushoverToken
+ integration.PushoverDevice = i.PushoverDevice
+ integration.PushoverPrefix = i.PushoverPrefix
}
// NewIntegrationForm returns a new IntegrationForm.
@@ -332,6 +342,11 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
DiscordWebhookLink: r.FormValue("discord_webhook_link"),
SlackEnabled: r.FormValue("slack_enabled") == "1",
SlackWebhookLink: r.FormValue("slack_webhook_link"),
+ PushoverEnabled: r.FormValue("pushover_enabled") == "1",
+ PushoverUser: r.FormValue("pushover_user"),
+ PushoverToken: r.FormValue("pushover_token"),
+ PushoverDevice: r.FormValue("pushover_device"),
+ PushoverPrefix: r.FormValue("pushover_prefix"),
}
}
diff --git a/internal/ui/integration_show.go b/internal/ui/integration_show.go
index 6e17bcee..05fc7ca5 100644
--- a/internal/ui/integration_show.go
+++ b/internal/ui/integration_show.go
@@ -131,6 +131,11 @@ func (h *handler) showIntegrationPage(w http.ResponseWriter, r *http.Request) {
DiscordWebhookLink: integration.DiscordWebhookLink,
SlackEnabled: integration.SlackEnabled,
SlackWebhookLink: integration.SlackWebhookLink,
+ PushoverEnabled: integration.PushoverEnabled,
+ PushoverUser: integration.PushoverUser,
+ PushoverToken: integration.PushoverToken,
+ PushoverDevice: integration.PushoverDevice,
+ PushoverPrefix: integration.PushoverPrefix,
}
sess := session.New(h.store, request.SessionID(r))