aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
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/Entry.php
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/Entry.php')
-rw-r--r--app/Models/Entry.php8
1 files changed, 8 insertions, 0 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'])) {