fix(social): allow single-char search and prefer native federated profiles

Lower minimum query length from 2 to 1 character so single-letter
searches return results.

Fix dedup to prefer native profiles (homeUserId=null) over replicated
ones. Previously the first-seen result won, which was usually the
local replicated profile (no instance badge, namespaced username).
Now when a native profile is found on the remote instance, it replaces
the replicated copy — showing the clean username with the instance badge.
This commit is contained in:
Jannis Braun
2026-03-25 02:26:33 +01:00
parent f0e72dc257
commit 7240aac2e0
2 changed files with 17 additions and 5 deletions
+1 -1
View File
@@ -483,7 +483,7 @@ export async function socialRoutes(app: FastifyInstance): Promise<void> {
const { q } = request.query;
const db = getDb();
if (!q || q.length < 2) {
if (!q || q.length < 1) {
return reply.code(200).send([]);
}