upd: use boolean function

This commit is contained in:
Mar0xy 2023-09-25 23:27:04 +02:00
parent a5c1d12ae9
commit f586bead0f
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828

View file

@ -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) {