if (parts.length === 3 && parts[0].length === 0) parts.shift()
const isWebfingerSearch = parts.length === 2 && parts.every(p => p && !p.includes(' '))
- if (isURISearch(search) || isWebfingerSearch) return searchVideoChannelURI(search, isWebfingerSearch, res)
+ if (isURISearch(search) || isWebfingerSearch) return searchVideoChannelURI(search, res)
// @username -> username to search in DB
if (search.startsWith('@')) query.search = search.replace(/^@/, '')
return res.json(getFormattedObjects(resultList.data, resultList.total))
}
-async function searchVideoChannelURI (search: string, isWebfingerSearch: boolean, res: express.Response) {
+async function searchVideoChannelURI (search: string, res: express.Response) {
let videoChannel: MChannelAccountDefault
let uri = search
- if (isWebfingerSearch) {
+ if (!isURISearch(search)) {
try {
uri = await loadActorUrlOrGetFromWebfinger(search)
} catch (err) {