diff options
Diffstat (limited to 'server/controllers/api/search.ts')
-rw-r--r-- | server/controllers/api/search.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts index 28a7a04ca..58851d0b5 100644 --- a/server/controllers/api/search.ts +++ b/server/controllers/api/search.ts | |||
@@ -56,6 +56,9 @@ function searchVideoChannels (req: express.Request, res: express.Response) { | |||
56 | const isURISearch = search.startsWith('http://') || search.startsWith('https://') | 56 | const isURISearch = search.startsWith('http://') || search.startsWith('https://') |
57 | 57 | ||
58 | const parts = search.split('@') | 58 | const parts = search.split('@') |
59 | |||
60 | // Handle strings like @toto@example.com | ||
61 | if (parts.length === 3 && parts[0].length === 0) parts.shift() | ||
59 | const isWebfingerSearch = parts.length === 2 && parts.every(p => p.indexOf(' ') === -1) | 62 | const isWebfingerSearch = parts.length === 2 && parts.every(p => p.indexOf(' ') === -1) |
60 | 63 | ||
61 | if (isURISearch || isWebfingerSearch) return searchVideoChannelURI(search, isWebfingerSearch, res) | 64 | if (isURISearch || isWebfingerSearch) return searchVideoChannelURI(search, isWebfingerSearch, res) |