From cb03bb169b08063991a02ff0c1c8ed705bdd0edf Mon Sep 17 00:00:00 2001 From: Gabi Purcaru Date: Thu, 29 Dec 2022 17:47:16 +0000 Subject: [PATCH] Honour discoverability flag --- components/Content.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/Content.tsx b/components/Content.tsx index 078f499..262cab3 100644 --- a/components/Content.tsx +++ b/components/Content.tsx @@ -11,6 +11,7 @@ type AccountDetails = { id: string acct: string followed_by: Set // list of handles + discoverable: boolean } async function usernameToId( @@ -68,10 +69,8 @@ async function accountFollows( throw new Error('HTTP request failed') } page = await response.json() - console.log(response.statusText) } catch (e) { logError(`Error while retrieving followers for ${handle}.`) - console.log('eeeee', e) break } if (!page.map) { @@ -114,8 +113,8 @@ async function accountFofs( indirectFollows .filter( - // exclude direct follows - ({ acct }) => !directFollowIds.has(acct) + // exclude direct follows and accounts who choose not to be discovered + ({ acct, discoverable }) => !directFollowIds.has(acct) && discoverable ) .map((account) => { const acct = account.acct