Keep the relay's relevance order in search results

This commit is contained in:
dtonon 2026-06-11 21:28:19 +01:00
parent d836ee588f
commit 0f9ce1a0ee

View file

@ -87,5 +87,7 @@ export async function searchThreads(query: string): Promise<SearchResult[]> {
}), }),
); );
return [...byThread.values()].sort((a, b) => b.createdAt - a.createdAt); // Keep the relay's relevance order (arrival order); a thread keeps the
// position of its best-ranked match
return [...byThread.values()];
} }