Fixed packing errors

This commit is contained in:
Natty 2024-01-03 20:35:41 +01:00
parent eab77d9225
commit 15892a8efa
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
2 changed files with 2 additions and 3 deletions

View File

@ -4,7 +4,6 @@ import {Users} from "../index.js";
import type {Packed} from "@/misc/schema.js"; import type {Packed} from "@/misc/schema.js";
import {convertLegacyReaction} from "@/misc/reaction-lib.js"; import {convertLegacyReaction} from "@/misc/reaction-lib.js";
import type {User} from "@/models/entities/user.js"; import type {User} from "@/models/entities/user.js";
import {getNote} from "@/server/api/common/getters.js";
export const NoteReactionRepository = db.getRepository(NoteReaction).extend({ export const NoteReactionRepository = db.getRepository(NoteReaction).extend({
async pack( async pack(
@ -32,7 +31,7 @@ export const NoteReactionRepository = db.getRepository(NoteReaction).extend({
...(opts.withNote ...(opts.withNote
? { ? {
// may throw error // may throw error
note: getNote(reaction.noteId, me), note: { id: reaction.noteId },
} }
: {}), : {}),
}; };

View File

@ -166,7 +166,7 @@ async function mergePack(
return { return {
type: "Note", type: "Note",
note, object: note,
}; };
} catch (e) { } catch (e) {
return null; return null;