Simplify expressions (#3473)

This commit is contained in:
Aya Morisawa 2018-12-02 19:35:41 +09:00 committed by GitHub
parent 92701e5cec
commit a0d9def98a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,7 +164,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<IU
uri: person.id, uri: person.id,
url: person.url, url: person.url,
isBot: isBot, isBot: isBot,
isCat: (person as any).isCat === true ? true : false isCat: (person as any).isCat === true
}) as IRemoteUser; }) as IRemoteUser;
} catch (e) { } catch (e) {
// duplicate key error // duplicate key error
@ -322,7 +322,7 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje
url: person.url, url: person.url,
endpoints: person.endpoints, endpoints: person.endpoints,
isBot: object.type == 'Service', isBot: object.type == 'Service',
isCat: (person as any).isCat === true ? true : false, isCat: (person as any).isCat === true
isLocked: person.manuallyApprovesFollowers, isLocked: person.manuallyApprovesFollowers,
createdAt: Date.parse(person.published) || null, createdAt: Date.parse(person.published) || null,
publicKey: { publicKey: {