Fix type errors in withPackedNote

This commit is contained in:
Michcio 2022-09-25 18:45:30 +02:00
parent 5d3959c87a
commit 3dade6c0e5
1 changed files with 5 additions and 5 deletions

View File

@ -65,14 +65,14 @@ export default abstract class Channel {
// were objects before are now strings and have to be restored or
// removed from the object
note.createdAt = new Date(note.createdAt);
delete note.reply;
delete note.renote;
delete note.user;
delete note.channel;
note.reply = null;
note.renote = null;
note.user = null;
note.channel = null;
const packed = await Notes.pack(note, this.user, { detail: true });
callback(packed);
await callback(packed);
} catch (err) {
if (err instanceof IdentifiableError && err.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') {
// skip: note not visible to user