aboutsummaryrefslogtreecommitdiff
path: root/app/Models
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-10-17 12:54:00 +0200
committerGravatar GitHub <noreply@github.com> 2025-10-17 12:54:00 +0200
commit1ef354a63e7a9de98f90961acb7d45f1d9aa893e (patch)
tree9ddd160a21b16a464a6f3943656f0ced81d71fe7 /app/Models
parentfbbb5a5e204755a3835383316fdd87ecdfd98d2b (diff)
GReader API frss:priority (#7583)
* GReader API frss:priority Experiment with a FreshRSS namespace in the GReader API to see whether there is any interest. fix https://github.com/FreshRSS/FreshRSS/issues/1868 `'frss:priority'` can be: `'important'`, `'main'`, `'category'`, `'feed'` (there is also the value `hidden`, but which is filtered out and as such never sent through the API at the moment) * Add visibility feed https://github.com/FreshRSS/FreshRSS/pull/7972
Diffstat (limited to 'app/Models')
-rw-r--r--app/Models/Entry.php8
-rw-r--r--app/Models/EntryDAO.php8
2 files changed, 12 insertions, 4 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index ea124794a..d4f5016f0 100644
--- a/app/Models/Entry.php
+++ b/app/Models/Entry.php
@@ -1212,6 +1212,14 @@ HTML;
} elseif ($mode === 'freshrss') {
$item['origin']['feedUrl'] = htmlspecialchars_decode($feed->url());
}
+ if ($feed->priority() >= FreshRSS_Feed::PRIORITY_MAIN_STREAM) {
+ $item['categories'][] = 'user/-/state/org.freshrss/main';
+ if ($feed->priority() >= FreshRSS_Feed::PRIORITY_IMPORTANT) {
+ $item['categories'][] = 'user/-/state/org.freshrss/important';
+ }
+ } elseif ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ $item['categories'][] = 'user/-/state/org.freshrss/hidden';
+ }
}
foreach ($this->enclosures() as $enclosure) {
if (!empty($enclosure['url'])) {
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index 6f60fb13f..d456b7711 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -1368,7 +1368,7 @@ SQL;
}
/**
- * @param 'a'|'A'|'i'|'s'|'S'|'c'|'f'|'t'|'T'|'ST'|'Z' $type
+ * @param 'a'|'A'|'c'|'f'|'i'|'s'|'S'|'ST'|'t'|'T'|'Z' $type
* @param int $id category/feed/tag ID
* @param numeric-string $id_min
* @param numeric-string $id_max
@@ -1462,7 +1462,7 @@ SQL;
}
/**
- * @param 'a'|'A'|'s'|'S'|'i'|'c'|'f'|'t'|'T'|'ST'|'Z' $type
+ * @param 'a'|'A'|'c'|'f'|'i'|'s'|'S'|'ST'|'t'|'T'|'Z' $type
* @param int $id category/feed/tag ID
* @param numeric-string $id_min
* @param numeric-string $id_max
@@ -1526,7 +1526,7 @@ SQL;
}
/**
- * @param 'a'|'A'|'s'|'S'|'i'|'c'|'f'|'t'|'T'|'ST'|'Z' $type
+ * @param 'a'|'A'|'c'|'f'|'i'|'s'|'S'|'ST'|'t'|'T'|'Z' $type
* @param int $id category/feed/tag ID
* @param numeric-string $id_min
* @param numeric-string $id_max
@@ -1595,7 +1595,7 @@ SQL;
}
/**
- * @param 'a'|'A'|'s'|'S'|'c'|'f'|'t'|'T'|'ST'|'Z' $type
+ * @param 'a'|'A'|'c'|'f'|'i'|'s'|'S'|'ST'|'t'|'T'|'Z' $type
* @param int $id category/feed/tag ID
* @param numeric-string $id_min
* @param numeric-string $id_max