mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
localSuggestionsController: skip accounts without a profile
This commit is contained in:
parent
2dfde337cd
commit
b7a1efe33c
1 changed files with 4 additions and 3 deletions
|
|
@ -113,14 +113,15 @@ export const localSuggestionsController: AppController = async (c) => {
|
|||
)
|
||||
.then((events) => hydrateEvents({ store, events, signal }));
|
||||
|
||||
const suggestions = await Promise.all([...pubkeys].map(async (pubkey) => {
|
||||
const suggestions = (await Promise.all([...pubkeys].map(async (pubkey) => {
|
||||
const profile = profiles.find((event) => event.pubkey === pubkey);
|
||||
if (!profile) return;
|
||||
|
||||
return {
|
||||
source: 'global',
|
||||
account: profile ? await renderAccount(profile) : await accountFromPubkey(pubkey),
|
||||
account: await renderAccount(profile),
|
||||
};
|
||||
}));
|
||||
}))).filter(Boolean);
|
||||
|
||||
return paginated(c, grants, suggestions);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue