From f50b04b015500a3b2a16efae25b22ddfd177c846 Mon Sep 17 00:00:00 2001 From: Michcio Date: Sun, 25 Sep 2022 18:45:30 +0200 Subject: [PATCH] Fix type errors in withPackedNote --- packages/backend/src/server/api/stream/channel.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/server/api/stream/channel.ts b/packages/backend/src/server/api/stream/channel.ts index e14aa77c1..a42042d13 100644 --- a/packages/backend/src/server/api/stream/channel.ts +++ b/packages/backend/src/server/api/stream/channel.ts @@ -69,14 +69,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