diff options
Diffstat (limited to 'server/controllers/api/search')
-rw-r--r-- | server/controllers/api/search/search-video-channels.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/search/search-video-channels.ts b/server/controllers/api/search/search-video-channels.ts index aa5afb46e..d615ff9ed 100644 --- a/server/controllers/api/search/search-video-channels.ts +++ b/server/controllers/api/search/search-video-channels.ts | |||
@@ -56,7 +56,7 @@ function searchVideoChannels (req: express.Request, res: express.Response) { | |||
56 | if (parts.length === 3 && parts[0].length === 0) parts.shift() | 56 | if (parts.length === 3 && parts[0].length === 0) parts.shift() |
57 | const isWebfingerSearch = parts.length === 2 && parts.every(p => p && !p.includes(' ')) | 57 | const isWebfingerSearch = parts.length === 2 && parts.every(p => p && !p.includes(' ')) |
58 | 58 | ||
59 | if (isURISearch(search) || isWebfingerSearch) return searchVideoChannelURI(search, isWebfingerSearch, res) | 59 | if (isURISearch(search) || isWebfingerSearch) return searchVideoChannelURI(search, res) |
60 | 60 | ||
61 | // @username -> username to search in DB | 61 | // @username -> username to search in DB |
62 | if (search.startsWith('@')) query.search = search.replace(/^@/, '') | 62 | if (search.startsWith('@')) query.search = search.replace(/^@/, '') |
@@ -110,11 +110,11 @@ async function searchVideoChannelsDB (query: VideoChannelsSearchQueryAfterSaniti | |||
110 | return res.json(getFormattedObjects(resultList.data, resultList.total)) | 110 | return res.json(getFormattedObjects(resultList.data, resultList.total)) |
111 | } | 111 | } |
112 | 112 | ||
113 | async function searchVideoChannelURI (search: string, isWebfingerSearch: boolean, res: express.Response) { | 113 | async function searchVideoChannelURI (search: string, res: express.Response) { |
114 | let videoChannel: MChannelAccountDefault | 114 | let videoChannel: MChannelAccountDefault |
115 | let uri = search | 115 | let uri = search |
116 | 116 | ||
117 | if (isWebfingerSearch) { | 117 | if (!isURISearch(search)) { |
118 | try { | 118 | try { |
119 | uri = await loadActorUrlOrGetFromWebfinger(search) | 119 | uri = await loadActorUrlOrGetFromWebfinger(search) |
120 | } catch (err) { | 120 | } catch (err) { |