From 9d5c5a8292a59cc9ed2695f76d0863a553f44224 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Tue, 24 Jan 2023 16:23:34 +1100 Subject: Check visibility for connected accounts in /users/:id/profile --- src/api/routes/users/#id/profile.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/api/routes/users/#id/profile.ts b/src/api/routes/users/#id/profile.ts index dbf95a52..4efa379e 100644 --- a/src/api/routes/users/#id/profile.ts +++ b/src/api/routes/users/#id/profile.ts @@ -142,7 +142,9 @@ router.get( guild_id, }; res.json({ - connected_accounts: user.connected_accounts, + connected_accounts: user.connected_accounts.filter( + (x) => x.visibility != 0, + ), premium_guild_since: premium_guild_since, // TODO premium_since: user.premium_since, // TODO mutual_guilds: mutual_guilds, // TODO {id: "", nick: null} when ?with_mutual_guilds=true -- cgit 1.4.1