forked from FoundKeyGang/FoundKey
Fix type errors in withPackedNote
This commit is contained in:
parent
b1d133c3d5
commit
7205021d62
1 changed files with 5 additions and 5 deletions
|
@ -69,14 +69,14 @@ export default abstract class Channel {
|
||||||
// were objects before are now strings and have to be restored or
|
// were objects before are now strings and have to be restored or
|
||||||
// removed from the object
|
// removed from the object
|
||||||
note.createdAt = new Date(note.createdAt);
|
note.createdAt = new Date(note.createdAt);
|
||||||
delete note.reply;
|
note.reply = null;
|
||||||
delete note.renote;
|
note.renote = null;
|
||||||
delete note.user;
|
note.user = null;
|
||||||
delete note.channel;
|
note.channel = null;
|
||||||
|
|
||||||
const packed = await Notes.pack(note, this.user, { detail: true });
|
const packed = await Notes.pack(note, this.user, { detail: true });
|
||||||
|
|
||||||
callback(packed);
|
await callback(packed);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof IdentifiableError && err.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') {
|
if (err instanceof IdentifiableError && err.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') {
|
||||||
// skip: note not visible to user
|
// skip: note not visible to user
|
||||||
|
|
Loading…
Reference in a new issue