'title' => $entry['title'],
'html' => $entry['content'],
'url' => $entry['url'],
- 'content_type' => '',
- 'language' => '',
'is_archived' => $entry['is_read'] || $this->markAsRead,
'is_starred' => $entry['is_fav'],
'tags' => '',
+ 'created_at' => '',
];
// force content to be refreshed in case on bad fetch in the v1 installation
return $data;
}
- protected function parseEntriesForProducer($entries)
+ /**
+ * {@inheritdoc}
+ */
+ protected function setEntryAsRead(array $importedEntry)
{
- foreach ($entries as $importedEntry) {
- // set userId for the producer (it won't know which user is connected)
- $importedEntry['userId'] = $this->user->getId();
+ $importedEntry['is_read'] = 1;
- if ($this->markAsRead) {
- $importedEntry['is_read'] = 1;
- }
-
- ++$this->importedEntries;
-
- $this->producer->publish(json_encode($importedEntry));
- }
+ return $importedEntry;
}
}