From a02ee3a08bac55c9f0b29cb6bc0a15726b7cc3c8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 8 Apr 2018 03:58:11 +0900 Subject: Some bug fixes --- src/remote/activitypub/act/create/image.ts | 2 +- src/remote/activitypub/act/create/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/remote/activitypub/act/create') diff --git a/src/remote/activitypub/act/create/image.ts b/src/remote/activitypub/act/create/image.ts index 30a75e7377..c87423c5fd 100644 --- a/src/remote/activitypub/act/create/image.ts +++ b/src/remote/activitypub/act/create/image.ts @@ -7,7 +7,7 @@ import { IDriveFile } from '../../../../models/drive-file'; const log = debug('misskey:activitypub'); export default async function(actor: IRemoteUser, image): Promise { - if ('attributedTo' in image && actor.account.uri !== image.attributedTo) { + if ('attributedTo' in image && actor.uri !== image.attributedTo) { log(`invalid image: ${JSON.stringify(image, null, 2)}`); throw new Error('invalid image'); } diff --git a/src/remote/activitypub/act/create/index.ts b/src/remote/activitypub/act/create/index.ts index dd0b112141..7cb9b08449 100644 --- a/src/remote/activitypub/act/create/index.ts +++ b/src/remote/activitypub/act/create/index.ts @@ -9,7 +9,7 @@ import { ICreate } from '../../type'; const log = debug('misskey:activitypub'); export default async (actor: IRemoteUser, activity: ICreate): Promise => { - if ('actor' in activity && actor.account.uri !== activity.actor) { + if ('actor' in activity && actor.uri !== activity.actor) { throw new Error('invalid actor'); } -- cgit v1.2.3-freya