Просмотр исходного кода

fix(storage): hide save button for notification-only integrations

Apprise, Discord and Slack only notify about new entries, but counted
as save targets: the save button did nothing, and the API accepted save
requests and reported has_integrations for users with only these
integrations.
Frédéric Guillot 2 часов назад
Родитель
Сommit
a19d2fc7da
2 измененных файлов с 0 добавлено и 6 удалено
  1. 0 3
      internal/storage/integration.go
  2. 0 3
      internal/storage/nav_metadata.go

+ 0 - 3
internal/storage/integration.go

@@ -678,7 +678,6 @@ func (s *Storage) HasSaveEntry(userID int64) (result bool) {
 				linkding_enabled='t' OR
 				linktaco_enabled='t' OR
 				linkwarden_enabled='t' OR
-				apprise_enabled='t' OR
 				shiori_enabled='t' OR
 				readeck_enabled='t' OR
 				shaarli_enabled='t' OR
@@ -688,8 +687,6 @@ func (s *Storage) HasSaveEntry(userID int64) (result bool) {
 				raindrop_enabled='t' OR
 				betula_enabled='t' OR
 				cubox_enabled='t' OR
-				discord_enabled='t' OR
-				slack_enabled='t' OR
 				archiveorg_enabled='t'
 			)
 	`

+ 0 - 3
internal/storage/nav_metadata.go

@@ -45,7 +45,6 @@ func (s *Storage) GetNavMetadata(userID int64) (NavMetadata, error) {
 					linkding_enabled='t' OR
 					linktaco_enabled='t' OR
 					linkwarden_enabled='t' OR
-					apprise_enabled='t' OR
 					shiori_enabled='t' OR
 					readeck_enabled='t' OR
 					shaarli_enabled='t' OR
@@ -55,8 +54,6 @@ func (s *Storage) GetNavMetadata(userID int64) (NavMetadata, error) {
 					raindrop_enabled='t' OR
 					betula_enabled='t' OR
 					cubox_enabled='t' OR
-					discord_enabled='t' OR
-					slack_enabled='t' OR
 					archiveorg_enabled='t'
 				   )
 			)) AS has_save_entry,