From a41862c7b0e91b25514f68b39ff778de40bd6deb Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Fri, 17 Sep 2021 14:47:23 -0400 Subject: [PATCH] Wait for auth only when putting to user graph --- utils/GunSmith/gun.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/GunSmith/gun.js b/utils/GunSmith/gun.js index 983a8837..39d5e3b8 100644 --- a/utils/GunSmith/gun.js +++ b/utils/GunSmith/gun.js @@ -211,8 +211,11 @@ const handleMsg = async msg => { }) } if (msg.type === 'put') { - await waitForAuth() const [root, ...keys] = msg.path.split('>') + if (root === '$user') { + await waitForAuth() + logger.info('waited for auth ok') + } /** @type {GunT.GUNNode} */ let node =