From 581a905b2fc14240d0bcbe6e2c14023fae3589a4 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 28 Dec 2022 10:48:45 -0800 Subject: always define follows --- lib/utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/utils.js b/lib/utils.js index 6a4bc1b2..17283836 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -65,10 +65,11 @@ export const getUser = async (username, transaction) => { }); await wait(() => !store.fetching[pubkey], 100, 10); - user.follows = JSON.parse(await redis.get(`${pubkey}:follows`)) || []; - user.followers = await redis.sMembers(`${pubkey}:followers`); } + user.follows = JSON.parse(await redis.get(`${pubkey}:follows`)) || []; + user.followers = await redis.sMembers(`${pubkey}:followers`); + return user; }; @@ -203,4 +204,3 @@ export const derivePayRequest = async ({ amount, memo, tip }) => { await ln.invoice(value ? `${value}sat` : "any", new Date(), memo, 360) ).bolt11; }; - -- cgit v1.2.3