Fixed packing errors
This commit is contained in:
parent
eab77d9225
commit
15892a8efa
|
@ -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 },
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
|
|
@ -166,7 +166,7 @@ async function mergePack(
|
|||
|
||||
return {
|
||||
type: "Note",
|
||||
note,
|
||||
object: note,
|
||||
};
|
||||
} catch (e) {
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue