summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/kernel
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-04-04 08:46:54 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-04-04 08:46:54 +0900
commitd4a630902d8d250b67fcd0ce2b49240786b40368 (patch)
treeb87395691e52e3b86ce40196993d492c694c5e79 /src/remote/activitypub/kernel
parentenhance(server): Log error message when internal error occured (diff)
downloadsharkey-d4a630902d8d250b67fcd0ce2b49240786b40368.tar.gz
sharkey-d4a630902d8d250b67fcd0ce2b49240786b40368.tar.bz2
sharkey-d4a630902d8d250b67fcd0ce2b49240786b40368.zip
refactor: Use ===
Diffstat (limited to 'src/remote/activitypub/kernel')
-rw-r--r--src/remote/activitypub/kernel/accept/follow.ts2
-rw-r--r--src/remote/activitypub/kernel/follow.ts2
-rw-r--r--src/remote/activitypub/kernel/reject/follow.ts2
-rw-r--r--src/remote/activitypub/kernel/undo/block.ts2
-rw-r--r--src/remote/activitypub/kernel/undo/follow.ts2
5 files changed, 5 insertions, 5 deletions
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<void> => {
- 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<void> => {
- 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<void> => {
- 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<void> => {
- 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<void> => {
- 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 + '/')) {