1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-22 08:03:52 +02:00

fix(duckduckgo): order by date (#3689)

This commit is contained in:
Dag
2023-09-23 17:50:41 +02:00
committed by GitHub
parent 07f49225d9
commit cb6c931b1f
6 changed files with 55 additions and 37 deletions

View File

@@ -45,10 +45,12 @@ class YandexZenBridge extends BridgeAbstract
$item['timestamp'] = date(DateTimeInterface::ATOM, $publicationDateUnixTimestamp);
}
$item['content'] = $post->text . "<br /><img src='$post->image' />";
$item['enclosures'] = [
$post->image,
];
$postImage = $post->image ?? null;
$item['content'] = $post->text;
if ($postImage) {
$item['content'] .= "<br /><img src='$postImage' />";
$item['enclosures'] = [$postImage];
}
$this->items[] = $item;
}