diff options
| author | 2025-10-17 12:54:00 +0200 | |
|---|---|---|
| committer | 2025-10-17 12:54:00 +0200 | |
| commit | 1ef354a63e7a9de98f90961acb7d45f1d9aa893e (patch) | |
| tree | 9ddd160a21b16a464a6f3943656f0ced81d71fe7 /app/Models/Entry.php | |
| parent | fbbb5a5e204755a3835383316fdd87ecdfd98d2b (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.php | 8 |
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'])) { |
