From 205881bfa979fd12c8a9d4b6984c66b7012c223b Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Mon, 25 Sep 2023 15:55:38 +0200 Subject: [PATCH] upd: change the way quote gets handled --- packages/megalodon/src/entities/status.ts | 2 +- packages/megalodon/src/misskey/api_client.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/megalodon/src/entities/status.ts b/packages/megalodon/src/entities/status.ts index 295703e57c..fd44d99897 100644 --- a/packages/megalodon/src/entities/status.ts +++ b/packages/megalodon/src/entities/status.ts @@ -38,7 +38,7 @@ namespace Entity { language: string | null pinned: boolean | null emoji_reactions: Array - quote: boolean + quote: Status | boolean | null bookmarked: boolean } diff --git a/packages/megalodon/src/misskey/api_client.ts b/packages/megalodon/src/misskey/api_client.ts index 97732d61a9..38444e7a4f 100644 --- a/packages/megalodon/src/misskey/api_client.ts +++ b/packages/megalodon/src/misskey/api_client.ts @@ -253,7 +253,7 @@ namespace MisskeyAPI { multiple: p.multiple, votes_count: count, options: Array.isArray(p.choices) ? p.choices.map(c => choice(c)) : [], - voted: Array.isArray(p.choices) ? p.choices.some(c => c.isVoted) : false + voted: Array.isArray(p.choices) ? p.choices.some(c => c.isVoted) : false, } } @@ -299,7 +299,7 @@ namespace MisskeyAPI { pinned: null, emoji_reactions: typeof n.reactions === 'object' ? mapReactions(n.reactions, n.myReaction) : [], bookmarked: false, - quote: n.renote !== undefined && n.text !== null + quote: n.renote && n.text ? note(n.renote, host) : null } }