From d4a630902d8d250b67fcd0ce2b49240786b40368 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 4 Apr 2020 08:46:54 +0900 Subject: refactor: Use === --- src/remote/activitypub/models/note.ts | 2 +- src/remote/activitypub/models/person.ts | 4 ++-- src/remote/activitypub/models/question.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/remote/activitypub/models') diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index 1e633704d4..a149660ccb 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -293,7 +293,7 @@ export async function createNote(value: string | IObject, resolver?: Resolver, s * リモートサーバーからフェッチしてMisskeyに登録しそれを返します。 */ export async function resolveNote(value: string | IObject, resolver?: Resolver): Promise { - const uri = typeof value == 'string' ? value : value.id; + const uri = typeof value === 'string' ? value : value.id; if (uri == null) throw new Error('missing uri'); // ブロックしてたら中断 diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 5936cee32c..80ba6b514a 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -136,7 +136,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise tag.toLowerCase()).splice(0, 32); - const isBot = object.type == 'Service'; + const isBot = object.type === 'Service'; // Create user let user: IRemoteUser; @@ -327,7 +327,7 @@ export async function updatePerson(uri: string, resolver?: Resolver | null, hint emojis: emojiNames, name: person.name, tags, - isBot: object.type == 'Service', + isBot: object.type === 'Service', isCat: (person as any).isCat === true, isLocked: !!person.manuallyApprovesFollowers, } as Partial; diff --git a/src/remote/activitypub/models/question.ts b/src/remote/activitypub/models/question.ts index 5c889db431..6b6749894a 100644 --- a/src/remote/activitypub/models/question.ts +++ b/src/remote/activitypub/models/question.ts @@ -41,7 +41,7 @@ export async function extractPollFromQuestion(source: string | IObject, resolver * @returns true if updated */ export async function updateQuestion(value: any) { - const uri = typeof value == 'string' ? value : value.id; + const uri = typeof value === 'string' ? value : value.id; // URIがこのサーバーを指しているならスキップ if (uri.startsWith(config.url + '/')) throw new Error('uri points local'); -- cgit v1.2.3-freya