From 136d7efde798d3dc0ec0dd18aac674365f7d162e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 3 Jun 2021 16:02:29 +0200 Subject: Refactor AP actors --- server/controllers/api/search.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/controllers/api/search.ts') diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts index 0cb5674c2..ef0f4285d 100644 --- a/server/controllers/api/search.ts +++ b/server/controllers/api/search.ts @@ -15,7 +15,7 @@ import { buildNSFWFilter, isUserAbleToSearchRemoteURI } from '../../helpers/expr import { logger } from '../../helpers/logger' import { getFormattedObjects } from '../../helpers/utils' import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger' -import { getOrCreateActorAndServerAndModel } from '../../lib/activitypub/actor' +import { getOrCreateAPActor } from '../../lib/activitypub/actors' import { asyncMiddleware, commonVideosFiltersValidator, @@ -145,7 +145,7 @@ async function searchVideoChannelURI (search: string, isWebfingerSearch: boolean if (isUserAbleToSearchRemoteURI(res)) { try { - const actor = await getOrCreateActorAndServerAndModel(uri, 'all', true, true) + const actor = await getOrCreateAPActor(uri, 'all', true, true) videoChannel = actor.VideoChannel } catch (err) { logger.info('Cannot search remote video channel %s.', uri, { err }) -- cgit v1.2.3