diff --git a/app/Http/Controllers/FeedsController.php b/app/Http/Controllers/FeedsController.php
index 3ffb99f8..e7602230 100644
--- a/app/Http/Controllers/FeedsController.php
+++ b/app/Http/Controllers/FeedsController.php
@@ -121,9 +121,8 @@ class FeedsController extends Controller
foreach ($notes as $key => $note) {
$data['items'][$key] = [
'id' => $note->longurl,
- 'title' => $note->getOriginal('note'),
'url' => $note->longurl,
- 'content_html' => $note->note,
+ 'content_html' => $note->content,
'date_published' => $note->created_at->tz('UTC')->toRfc3339String(),
'date_modified' => $note->updated_at->tz('UTC')->toRfc3339String(),
'author' => [
diff --git a/app/Models/Note.php b/app/Models/Note.php
index cbbc5335..8ed7f9c1 100644
--- a/app/Models/Note.php
+++ b/app/Models/Note.php
@@ -176,6 +176,37 @@ class Note extends Model
return $modified;
}
+ /**
+ * Provide the content_html for JSON feed.
+ *
+ * In particular we want to include media links such as images.
+ *
+ * @return string
+ */
+ public function getContentAttribute(): string
+ {
+ $note = $this->note;
+
+ foreach ($this->media as $media) {
+ if ($media->type == 'image') {
+ $note .= '
';
+ }
+ if ($media->type == 'audio') {
+ $note .= '