From 15892a8efafe765cabdf4595b06d64e9ee16cede Mon Sep 17 00:00:00 2001 From: Natty Date: Wed, 3 Jan 2024 20:35:41 +0100 Subject: [PATCH] Fixed packing errors --- packages/backend/src/models/repositories/note-reaction.ts | 3 +-- packages/backend/src/server/api/endpoints/ap/show.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/models/repositories/note-reaction.ts b/packages/backend/src/models/repositories/note-reaction.ts index 9b536aae07..1ad9507ce4 100644 --- a/packages/backend/src/models/repositories/note-reaction.ts +++ b/packages/backend/src/models/repositories/note-reaction.ts @@ -4,7 +4,6 @@ import {Users} from "../index.js"; import type {Packed} from "@/misc/schema.js"; import {convertLegacyReaction} from "@/misc/reaction-lib.js"; import type {User} from "@/models/entities/user.js"; -import {getNote} from "@/server/api/common/getters.js"; export const NoteReactionRepository = db.getRepository(NoteReaction).extend({ async pack( @@ -32,7 +31,7 @@ export const NoteReactionRepository = db.getRepository(NoteReaction).extend({ ...(opts.withNote ? { // may throw error - note: getNote(reaction.noteId, me), + note: { id: reaction.noteId }, } : {}), }; diff --git a/packages/backend/src/server/api/endpoints/ap/show.ts b/packages/backend/src/server/api/endpoints/ap/show.ts index fde94844a8..c9bb6eeca6 100644 --- a/packages/backend/src/server/api/endpoints/ap/show.ts +++ b/packages/backend/src/server/api/endpoints/ap/show.ts @@ -166,7 +166,7 @@ async function mergePack( return { type: "Note", - note, + object: note, }; } catch (e) { return null;