mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
suggestions: fix profile lookup, limit to 20 items for now
This commit is contained in:
parent
4ee4266843
commit
e25372313b
1 changed files with 3 additions and 2 deletions
|
|
@ -33,10 +33,11 @@ async function renderSuggestedAccounts(store: NStore, signal?: AbortSignal) {
|
||||||
{ signal },
|
{ signal },
|
||||||
);
|
);
|
||||||
|
|
||||||
const pubkeys = [...getTagSet(follows?.tags ?? [], 'p')];
|
// TODO: pagination
|
||||||
|
const pubkeys = [...getTagSet(follows?.tags ?? [], 'p')].slice(0, 20);
|
||||||
|
|
||||||
const profiles = await store.query(
|
const profiles = await store.query(
|
||||||
[{ kinds: [1], authors: pubkeys }],
|
[{ kinds: [0], authors: pubkeys, limit: pubkeys.length }],
|
||||||
{ signal },
|
{ signal },
|
||||||
)
|
)
|
||||||
.then((events) => hydrateEvents({ events, storage: store, signal }));
|
.then((events) => hydrateEvents({ events, storage: store, signal }));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue