From f586bead0f324bb53f9e7544ac2ac928816aae2c Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Mon, 25 Sep 2023 23:27:04 +0200 Subject: [PATCH] upd: use boolean function --- packages/megalodon/src/misskey.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/megalodon/src/misskey.ts b/packages/megalodon/src/misskey.ts index 000e491809..9d912ccebd 100644 --- a/packages/megalodon/src/misskey.ts +++ b/packages/megalodon/src/misskey.ts @@ -225,7 +225,7 @@ export default class Misskey implements MegalodonInterface { if (options) { if (options.bot !== undefined) { params = Object.assign(params, { - isBot: options.bot.toString() === 'true' ? true : false + isBot: Boolean(options.bot) }) } if (options.display_name) { @@ -240,7 +240,7 @@ export default class Misskey implements MegalodonInterface { } if (options.locked !== undefined) { params = Object.assign(params, { - isLocked: options.locked + isLocked: Boolean(options.locked) }) } if (options.source) {