aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/search.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-03 16:02:29 +0200
committerChocobozzz <me@florianbigard.com>2021-06-03 16:40:32 +0200
commit136d7efde798d3dc0ec0dd18aac674365f7d162e (patch)
tree3a0e2a7a5d04dedf0d8ffda99c2787cecb838891 /server/controllers/api/search.ts
parent49af5ac8c2653cb0ef23479c9d3256c5b724d49d (diff)
downloadPeerTube-136d7efde798d3dc0ec0dd18aac674365f7d162e.tar.gz
PeerTube-136d7efde798d3dc0ec0dd18aac674365f7d162e.tar.zst
PeerTube-136d7efde798d3dc0ec0dd18aac674365f7d162e.zip
Refactor AP actors
Diffstat (limited to 'server/controllers/api/search.ts')
-rw-r--r--server/controllers/api/search.ts4
1 files changed, 2 insertions, 2 deletions
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
15import { logger } from '../../helpers/logger' 15import { logger } from '../../helpers/logger'
16import { getFormattedObjects } from '../../helpers/utils' 16import { getFormattedObjects } from '../../helpers/utils'
17import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger' 17import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger'
18import { getOrCreateActorAndServerAndModel } from '../../lib/activitypub/actor' 18import { getOrCreateAPActor } from '../../lib/activitypub/actors'
19import { 19import {
20 asyncMiddleware, 20 asyncMiddleware,
21 commonVideosFiltersValidator, 21 commonVideosFiltersValidator,
@@ -145,7 +145,7 @@ async function searchVideoChannelURI (search: string, isWebfingerSearch: boolean
145 145
146 if (isUserAbleToSearchRemoteURI(res)) { 146 if (isUserAbleToSearchRemoteURI(res)) {
147 try { 147 try {
148 const actor = await getOrCreateActorAndServerAndModel(uri, 'all', true, true) 148 const actor = await getOrCreateAPActor(uri, 'all', true, true)
149 videoChannel = actor.VideoChannel 149 videoChannel = actor.VideoChannel
150 } catch (err) { 150 } catch (err) {
151 logger.info('Cannot search remote video channel %s.', uri, { err }) 151 logger.info('Cannot search remote video channel %s.', uri, { err })