From e90c3b20668e3bbfb9d9acdbd062f68a9a5a3e04 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Thu, 30 Jan 2020 07:22:11 -0400 Subject: [PATCH] better filtering --- services/gunDB/contact-api/events/onSentReqs.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/gunDB/contact-api/events/onSentReqs.js b/services/gunDB/contact-api/events/onSentReqs.js index 78c9abdf..272bddcf 100644 --- a/services/gunDB/contact-api/events/onSentReqs.js +++ b/services/gunDB/contact-api/events/onSentReqs.js @@ -44,10 +44,9 @@ const react = () => { const lastReqID = pubToLastSentReqID[recipientPub] const isStale = typeof lastReqID !== 'undefined' && lastReqID !== sentReqID - const aHandshakeWasEstablishedAtSomePoint = - typeof pubToIncoming[recipientPub] !== 'undefined' + const isConnected = typeof pubToIncoming[recipientPub] !== 'undefined' - if (isStale && aHandshakeWasEstablishedAtSomePoint) { + if (isStale || isConnected) { // eslint-disable-next-line no-continue continue }