From 1ef354a63e7a9de98f90961acb7d45f1d9aa893e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 17 Oct 2025 12:54:00 +0200 Subject: 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 --- app/Models/Entry.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/Models/Entry.php') 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'])) { -- cgit v1.2.3