From 88c522a2a54d2a76a774f952c581c10aae7d5b1e Mon Sep 17 00:00:00 2001 From: mei23 Date: Sun, 8 Jul 2018 17:22:11 +0900 Subject: [PATCH] Fix can't process follow accept/reject from remote --- src/remote/activitypub/kernel/accept/follow.ts | 2 +- src/remote/activitypub/kernel/reject/follow.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/remote/activitypub/kernel/accept/follow.ts b/src/remote/activitypub/kernel/accept/follow.ts index 0f414ba32..07c820c28 100644 --- a/src/remote/activitypub/kernel/accept/follow.ts +++ b/src/remote/activitypub/kernel/accept/follow.ts @@ -5,7 +5,7 @@ import accept from '../../../../services/following/requests/accept'; import { IFollow } from '../../type'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { - const id = typeof activity.object == 'string' ? activity.object : activity.object.id; + const id = typeof activity.actor == 'string' ? activity.actor : activity.actor.id; if (!id.startsWith(config.url + '/')) { return null; diff --git a/src/remote/activitypub/kernel/reject/follow.ts b/src/remote/activitypub/kernel/reject/follow.ts index c139865d0..35cd2ec0c 100644 --- a/src/remote/activitypub/kernel/reject/follow.ts +++ b/src/remote/activitypub/kernel/reject/follow.ts @@ -5,7 +5,7 @@ import reject from '../../../../services/following/requests/reject'; import { IFollow } from '../../type'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { - const id = typeof activity.object == 'string' ? activity.object : activity.object.id; + const id = typeof activity.actor == 'string' ? activity.actor : activity.actor.id; if (!id.startsWith(config.url + '/')) { return null;