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

refactor: deprecate FeedItem constructor (#4201)

* fix: bug in prior commit

* refactor: deprecate FeedItem constructor

* test: fix
This commit is contained in:
Dag
2024-08-08 03:43:26 +02:00
committed by GitHub
parent 2a96bf19b5
commit 6afd13eb06
11 changed files with 78 additions and 114 deletions

View File

@@ -255,7 +255,7 @@ class Vk2Bridge extends BridgeAbstract
if (!$ownerId) {
$ownerId = $post['owner_id'];
}
$item = new FeedItem();
$item = [];
$content = $this->generateContentFromPost($post);
if (isset($post['copy_history'])) {
if ($this->getInput('hide_reposts')) {
@@ -277,11 +277,11 @@ class Vk2Bridge extends BridgeAbstract
$content .= '):</p>';
$content .= $this->generateContentFromPost($originalPost);
}
$item->setContent($content);
$item->setTimestamp($post['date']);
$item->setAuthor($this->ownerNames[$post['from_id']]);
$item->setTitle($this->getTitle(strip_tags($content)));
$item->setURI($this->getPostURI($post));
$item['content'] = $content;
$item['timestamp'] = $post['date'];
$item['author'] = $this->ownerNames[$post['from_id']];
$item['title'] = $this->getTitle(strip_tags($content));
$item['uri'] = $this->getPostURI($post);
$this->items[] = $item;
}