fix: resolve account URLs in search, not just @-handles
Search with resolve=true only tried remote account resolution for queries containing "@". Pasting an actor URL (https://instance/users/...) returned empty results because the URL has no "@". Now also resolves when the query starts with "http". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -83,7 +83,7 @@ router.get("/api/v2/search", tokenRequired, scopeRequired("read", "read:search")
|
||||
}
|
||||
|
||||
// If no local results and resolve=true, try remote lookup
|
||||
if (results.accounts.length === 0 && resolve && query.includes("@")) {
|
||||
if (results.accounts.length === 0 && resolve && (query.includes("@") || query.startsWith("http"))) {
|
||||
const resolved = await resolveRemoteAccount(query, pluginOptions, baseUrl, collections);
|
||||
if (resolved) {
|
||||
results.accounts.push(resolved);
|
||||
|
||||
Reference in New Issue
Block a user