Merge branch 'main' into enhance-profile-search-again

This commit is contained in:
P. Reis
2024-09-17 14:42:15 -03:00
10 changed files with 35 additions and 14 deletions

View File

@@ -386,7 +386,7 @@ const followersController: AppController = (c) => {
const followingController: AppController = async (c) => {
const pubkey = c.req.param('pubkey');
const pubkeys = await getFollowedPubkeys(pubkey);
return renderAccounts(c, pubkeys);
return renderAccounts(c, [...pubkeys]);
};
/** https://docs.joinmastodon.org/methods/accounts/#block */
@@ -465,7 +465,7 @@ const familiarFollowersController: AppController = async (c) => {
const follows = await getFollowedPubkeys(pubkey);
const results = await Promise.all(ids.map(async (id) => {
const followLists = await store.query([{ kinds: [3], authors: follows, '#p': [id] }])
const followLists = await store.query([{ kinds: [3], authors: [...follows], '#p': [id] }])
.then((events) => hydrateEvents({ events, store }));
const accounts = await Promise.all(

View File

@@ -215,7 +215,7 @@ async function topicToFilter(
// HACK: this puts the user's entire contacts list into RAM,
// and then calls `matchFilters` over it. Refreshing the page
// is required after following a new user.
return pubkey ? { kinds: [1, 6], authors: await getFeedPubkeys(pubkey) } : undefined;
return pubkey ? { kinds: [1, 6], authors: [...await getFeedPubkeys(pubkey)] } : undefined;
}
}

View File

@@ -13,7 +13,7 @@ import { renderReblog, renderStatus } from '@/views/mastodon/statuses.ts';
const homeTimelineController: AppController = async (c) => {
const params = c.get('pagination');
const pubkey = await c.get('signer')?.getPublicKey()!;
const authors = await getFeedPubkeys(pubkey);
const authors = [...await getFeedPubkeys(pubkey)];
return renderStatuses(c, [{ authors, kinds: [1, 6], ...params }]);
};