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/kernel/accept/follow.ts | 2 +- src/remote/activitypub/kernel/follow.ts | 2 +- src/remote/activitypub/kernel/reject/follow.ts | 2 +- src/remote/activitypub/kernel/undo/block.ts | 2 +- src/remote/activitypub/kernel/undo/follow.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/remote/activitypub/kernel') diff --git a/src/remote/activitypub/kernel/accept/follow.ts b/src/remote/activitypub/kernel/accept/follow.ts index 377b8dac42..cf6763186e 100644 --- a/src/remote/activitypub/kernel/accept/follow.ts +++ b/src/remote/activitypub/kernel/accept/follow.ts @@ -5,7 +5,7 @@ import { IFollow } from '../../type'; import { Users } from '../../../../models'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { - const id = typeof activity.actor == 'string' ? activity.actor : activity.actor.id; + const id = typeof activity.actor === 'string' ? activity.actor : activity.actor.id; if (id == null) throw new Error('missing id'); if (!id.startsWith(config.url + '/')) { diff --git a/src/remote/activitypub/kernel/follow.ts b/src/remote/activitypub/kernel/follow.ts index c255067bfd..fca6d26ccc 100644 --- a/src/remote/activitypub/kernel/follow.ts +++ b/src/remote/activitypub/kernel/follow.ts @@ -5,7 +5,7 @@ import { IFollow } from '../type'; import { Users } from '../../../models'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { - const id = typeof activity.object == 'string' ? activity.object : activity.object.id; + const id = typeof activity.object === 'string' ? activity.object : activity.object.id; if (id == null) throw new Error('missing id'); if (!id.startsWith(config.url + '/')) { diff --git a/src/remote/activitypub/kernel/reject/follow.ts b/src/remote/activitypub/kernel/reject/follow.ts index d8b5a4b9b9..bc7d03f9a9 100644 --- a/src/remote/activitypub/kernel/reject/follow.ts +++ b/src/remote/activitypub/kernel/reject/follow.ts @@ -5,7 +5,7 @@ import { IFollow } from '../../type'; import { Users } from '../../../../models'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { - const id = typeof activity.actor == 'string' ? activity.actor : activity.actor.id; + const id = typeof activity.actor === 'string' ? activity.actor : activity.actor.id; if (id == null) throw new Error('missing id'); if (!id.startsWith(config.url + '/')) { diff --git a/src/remote/activitypub/kernel/undo/block.ts b/src/remote/activitypub/kernel/undo/block.ts index 8ef70a9bef..17eab0d2d0 100644 --- a/src/remote/activitypub/kernel/undo/block.ts +++ b/src/remote/activitypub/kernel/undo/block.ts @@ -8,7 +8,7 @@ import { Users } from '../../../../models'; const logger = apLogger; export default async (actor: IRemoteUser, activity: IBlock): Promise => { - const id = typeof activity.object == 'string' ? activity.object : activity.object.id; + const id = typeof activity.object === 'string' ? activity.object : activity.object.id; if (id == null) throw new Error('missing id'); const uri = activity.id || activity; diff --git a/src/remote/activitypub/kernel/undo/follow.ts b/src/remote/activitypub/kernel/undo/follow.ts index d75f055640..2a42f83907 100644 --- a/src/remote/activitypub/kernel/undo/follow.ts +++ b/src/remote/activitypub/kernel/undo/follow.ts @@ -6,7 +6,7 @@ import { IRemoteUser } from '../../../../models/entities/user'; import { Users, FollowRequests, Followings } from '../../../../models'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { - const id = typeof activity.object == 'string' ? activity.object : activity.object.id; + const id = typeof activity.object === 'string' ? activity.object : activity.object.id; if (id == null) throw new Error('missing id'); if (!id.startsWith(config.url + '/')) { -- cgit v1.2.3-freya