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/undo/block.ts | 2 +- src/remote/activitypub/kernel/undo/follow.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/remote/activitypub/kernel/undo') 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