diff --git a/src/remote/activitypub/models/image.ts b/src/remote/activitypub/models/image.ts index 76e1bac901..ae353f5efc 100644 --- a/src/remote/activitypub/models/image.ts +++ b/src/remote/activitypub/models/image.ts @@ -4,6 +4,7 @@ import uploadFromUrl from '../../../services/drive/upload-from-url'; import { IRemoteUser } from '../../../models/user'; import DriveFile, { IDriveFile } from '../../../models/drive-file'; import Resolver from '../resolver'; +import fetchMeta from '../../../misc/fetch-meta'; const log = debug('misskey:activitypub'); @@ -24,7 +25,10 @@ export async function createImage(actor: IRemoteUser, value: any): Promise => { log(`REQUESTED: ${url}`); @@ -77,13 +77,11 @@ export default async ( }); }); - const instance = await fetchMeta(); - let driveFile: IDriveFile; let error; try { - driveFile = await create(user, path, name, null, folderId, force, !instance.cacheRemoteFiles, url, uri, sensitive); + driveFile = await create(user, path, name, null, folderId, force, link, url, uri, sensitive); log(`got: ${driveFile._id}`); } catch (e) { error = e;