1
0
Fork 0
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:
Frédéric Guillot 2024-07-13 16:52:30 -07:00
parent 3ca52c7f7f
commit 968355f9b9
32 changed files with 567 additions and 17 deletions

View file

@ -347,9 +347,11 @@ func (s *Storage) UpdateFeed(feed *model.Feed) (err error) {
no_media_player=$26,
apprise_service_urls=$27,
disable_http2=$28,
description=$29
description=$29,
ntfy_enabled=$30,
ntfy_priority=$31
WHERE
id=$30 AND user_id=$31
id=$32 AND user_id=$33
`
_, err = s.db.Exec(query,
feed.FeedURL,
@ -381,6 +383,8 @@ func (s *Storage) UpdateFeed(feed *model.Feed) (err error) {
feed.AppriseServiceURLs,
feed.DisableHTTP2,
feed.Description,
feed.NtfyEnabled,
feed.NtfyPriority,
feed.ID,
feed.UserID,
)

View file

@ -165,7 +165,9 @@ func (f *FeedQueryBuilder) GetFeeds() (model.Feeds, error) {
fi.icon_id,
u.timezone,
f.apprise_service_urls,
f.disable_http2
f.disable_http2,
f.ntfy_enabled,
f.ntfy_priority
FROM
feeds f
LEFT JOIN
@ -234,6 +236,8 @@ func (f *FeedQueryBuilder) GetFeeds() (model.Feeds, error) {
&tz,
&feed.AppriseServiceURLs,
&feed.DisableHTTP2,
&feed.NtfyEnabled,
&feed.NtfyPriority,
)
if err != nil {

View file

@ -200,7 +200,14 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
raindrop_tags,
betula_enabled,
betula_url,
betula_token
betula_token,
ntfy_enabled,
ntfy_topic,
ntfy_url,
ntfy_api_token,
ntfy_username,
ntfy_password,
ntfy_icon_url
FROM
integrations
WHERE
@ -300,6 +307,13 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
&integration.BetulaEnabled,
&integration.BetulaURL,
&integration.BetulaToken,
&integration.NtfyEnabled,
&integration.NtfyTopic,
&integration.NtfyURL,
&integration.NtfyAPIToken,
&integration.NtfyUsername,
&integration.NtfyPassword,
&integration.NtfyIconURL,
)
switch {
case err == sql.ErrNoRows:
@ -407,9 +421,16 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
raindrop_tags=$88,
betula_enabled=$89,
betula_url=$90,
betula_token=$91
betula_token=$91,
ntfy_enabled=$92,
ntfy_topic=$93,
ntfy_url=$94,
ntfy_api_token=$95,
ntfy_username=$96,
ntfy_password=$97,
ntfy_icon_url=$98
WHERE
user_id=$92
user_id=$99
`
_, err := s.db.Exec(
query,
@ -504,6 +525,13 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
integration.BetulaEnabled,
integration.BetulaURL,
integration.BetulaToken,
integration.NtfyEnabled,
integration.NtfyTopic,
integration.NtfyURL,
integration.NtfyAPIToken,
integration.NtfyUsername,
integration.NtfyPassword,
integration.NtfyIconURL,
integration.UserID,
)