From e3266ddecd825b8716df7dc418246441d4dcb0f7 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 6 Jan 2023 17:31:22 -0800 Subject: background nostr fetching --- lib/utils.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/utils.js') diff --git a/lib/utils.js b/lib/utils.js index 748b2a74..95ee5fb1 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -11,6 +11,8 @@ import ln from "$lib/ln"; const { Op } = sequelize; +export const nada = () => {}; + export const sleep = n => new Promise(r => setTimeout(r, n)); export const wait = async (f, s = 300, n = 50) => { let i = 0; @@ -33,7 +35,10 @@ export const getUser = async (username, transaction) => { } ], where: { - username: { [Op.or]: [username, username.replace(/ /g, "")] } + [Op.or]: { + username: { [Op.or]: [username, username.replace(/ /g, "")] }, + uuid: { [Op.or]: [username, username.replace(/ /g, "")] } + } } }; -- cgit v1.2.3