From 56b19ab6bbec024abe23ce73e078d5c3ca534252 Mon Sep 17 00:00:00 2001 From: Marie Date: Sun, 24 Mar 2024 23:41:23 +0000 Subject: [PATCH 1/2] fix: incorrect type for quote property --- packages/backend/src/server/api/mastodon/converters.ts | 2 +- packages/megalodon/src/misskey/api_client.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/mastodon/converters.ts b/packages/backend/src/server/api/mastodon/converters.ts index 20fccec21..ca6f233b7 100644 --- a/packages/backend/src/server/api/mastodon/converters.ts +++ b/packages/backend/src/server/api/mastodon/converters.ts @@ -278,7 +278,7 @@ export class MastoConverters { reactions: status.emoji_reactions, emoji_reactions: status.emoji_reactions, bookmarked: false, - quote: isQuote ? await this.convertReblog(status.reblog) : false, + quote: isQuote ? await this.convertReblog(status.reblog) : null, edited_at: note.updatedAt?.toISOString(), }); } diff --git a/packages/megalodon/src/misskey/api_client.ts b/packages/megalodon/src/misskey/api_client.ts index 520928c9f..02828dcf9 100644 --- a/packages/megalodon/src/misskey/api_client.ts +++ b/packages/megalodon/src/misskey/api_client.ts @@ -303,7 +303,7 @@ namespace MisskeyAPI { pinned: null, emoji_reactions: typeof n.reactions === 'object' ? mapReactions(n.reactions, n.myReaction) : [], bookmarked: false, - quote: n.renote && n.text ? note(n.renote, n.user.host ? n.user.host : host ? host : null) : false + quote: n.renote && n.text ? note(n.renote, n.user.host ? n.user.host : host ? host : null) : null } } From ece86f756dc0696ca833790aa09b182e1246b4ec Mon Sep 17 00:00:00 2001 From: Marie Date: Sun, 24 Mar 2024 23:46:57 +0000 Subject: [PATCH 2/2] chore: add new type --- packages/megalodon/src/entities/status.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/megalodon/src/entities/status.ts b/packages/megalodon/src/entities/status.ts index da36a0471..bb003f13d 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: Status | boolean + quote: Status | boolean | null bookmarked: boolean }