From 32c087e69f4d4040fe75fc698c4fce1fa51c3281 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Tue, 4 Feb 2020 16:56:28 -0400 Subject: [PATCH] refresh missing data --- services/gunDB/contact-api/events/onSentReqs.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/services/gunDB/contact-api/events/onSentReqs.js b/services/gunDB/contact-api/events/onSentReqs.js index 947fa12b..171d6835 100644 --- a/services/gunDB/contact-api/events/onSentReqs.js +++ b/services/gunDB/contact-api/events/onSentReqs.js @@ -55,13 +55,18 @@ const react = () => { continue } + if (typeof currAddress === 'undefined') { + // eslint-disable-next-line no-empty-function + Streams.onAddresses(() => {}, recipientPub)() + } + if (typeof pubToAvatar[recipientPub] === 'undefined') { // eslint-disable-next-line no-empty-function - Streams.onAvatar(() => {}, recipientPub) + Streams.onAvatar(() => {}, recipientPub)() } if (typeof pubToDN[recipientPub] === 'undefined') { // eslint-disable-next-line no-empty-function - Streams.onDisplayName(() => {}, recipientPub) + Streams.onDisplayName(() => {}, recipientPub)() } finalSentReqs.push({ @@ -74,14 +79,6 @@ const react = () => { timestamp }) } - - if (finalSentReqs.length > 0) { - console.log('-------------------------') - console.log('pub to incoming') - console.log(pubToIncoming) - console.log('-------------------------') - } - currentReqs = finalSentReqs listeners.forEach(l => l(currentReqs))