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:
@@ -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([]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user