diff --git a/packages/backend/src/server/api/mastodon/converters/note.ts b/packages/backend/src/server/api/mastodon/converters/note.ts index c0c116c9be..26f0fbf23a 100644 --- a/packages/backend/src/server/api/mastodon/converters/note.ts +++ b/packages/backend/src/server/api/mastodon/converters/note.ts @@ -327,6 +327,7 @@ export class NoteConverter { ), bookmarked: isBookmarked, quote: reblog.then((reblog) => (isQuote(note) ? reblog : null)), + quote_id: isQuote(note) ? note.renoteId : null, edited_at: note.updatedAt?.toISOString() ?? null, filtered: filtered, }); @@ -438,9 +439,6 @@ export class NoteConverter { ctx.pinAggregate = pinAggregate; const users = notes.filter((p) => !!p.user).map((p) => p.user as User); - const renoteUserIds = notes - .filter((p) => p.renoteUserId !== null) - .map((p) => p.renoteUserId as string); await UserConverter.aggregateData([...users], ctx); await prefetchEmojis(aggregateNoteEmojis(notes)); } diff --git a/packages/backend/src/server/api/mastodon/entities/status.ts b/packages/backend/src/server/api/mastodon/entities/status.ts index 1985cdb639..7264ec80d0 100644 --- a/packages/backend/src/server/api/mastodon/entities/status.ts +++ b/packages/backend/src/server/api/mastodon/entities/status.ts @@ -41,6 +41,7 @@ namespace MastodonEntity { pinned: boolean | undefined; reactions: Array; quote: Status | null; + quote_id: string | null; bookmarked: boolean; edited_at: string | null; filtered: Array | null; diff --git a/packages/backend/src/server/api/mastodon/helpers/search.ts b/packages/backend/src/server/api/mastodon/helpers/search.ts index 7f36131be9..b87b489991 100644 --- a/packages/backend/src/server/api/mastodon/helpers/search.ts +++ b/packages/backend/src/server/api/mastodon/helpers/search.ts @@ -266,7 +266,7 @@ export class SearchHelpers { generateBlockedUserQuery(query, user); } - query.setParameter("meId", user); + query.setParameter("meId", user.id); return query .skip(offset ?? 0)