diff --git a/packages/backend/src/server/api/mastodon/converters/note.ts b/packages/backend/src/server/api/mastodon/converters/note.ts index bd92f5618..b2703cf1d 100644 --- a/packages/backend/src/server/api/mastodon/converters/note.ts +++ b/packages/backend/src/server/api/mastodon/converters/note.ts @@ -108,7 +108,7 @@ export class NoteConverter { account: Promise.resolve(noteUser).then(p => UserConverter.encode(p, cache)), in_reply_to_id: note.replyId, in_reply_to_account_id: note.replyUserId, - reblog: Promise.resolve(renote).then(renote => renote && note.text === null ? this.encode(renote, user, cache, false) : null), + reblog: Promise.resolve(renote).then(renote => recurse && renote && note.text === null ? this.encode(renote, user, cache, false) : null), content: text.then(text => text !== null ? MfmHelpers.toHtml(mfm.parse(text), JSON.parse(note.mentionedRemoteUsers)) ?? escapeMFM(text) : ""), text: text, created_at: note.createdAt.toISOString(), @@ -134,7 +134,7 @@ export class NoteConverter { // Use emojis list to provide URLs for emoji reactions. reactions: [], //FIXME: this.mapReactions(n.emojis, n.reactions, n.myReaction), bookmarked: isBookmarked, - quote: Promise.resolve(renote).then(renote => renote && note.text !== null ? this.encode(renote, user, cache, false) : null), + quote: Promise.resolve(renote).then(renote => recurse && renote && note.text !== null ? this.encode(renote, user, cache, false) : null), edited_at: note.updatedAt?.toISOString() }); }