generate_syndicated_feed: add source section to JSON-formatted output

This commit is contained in:
Andrew Dolgov 2022-08-16 20:02:28 +03:00
parent 7d77edd1fb
commit ec764f97e7
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
1 changed files with 5 additions and 0 deletions

View File

@ -219,6 +219,11 @@ class Handler_Public extends Handler {
if (!empty($line['note'])) $article['note'] = $line['note'];
if (!empty($line['author'])) $article['author'] = $line['author'];
$article['source'] = [
'link' => $line['site_url'] ? $line["site_url"] : Config::get_self_url(),
'title' => $line['feed_title'] ?? $feed_title
];
if (count($line["tags"]) > 0) {
$article['tags'] = array();