From 74fa91c1b0502e624668a3605e5a1a53acfcf3e1 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Thu, 13 Feb 2020 18:55:23 -0400 Subject: [PATCH] filter unconnected on first contact request --- services/gunDB/contact-api/events/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/gunDB/contact-api/events/index.js b/services/gunDB/contact-api/events/index.js index c420862b..9c85b218 100644 --- a/services/gunDB/contact-api/events/index.js +++ b/services/gunDB/contact-api/events/index.js @@ -424,7 +424,11 @@ const processChats = debounce(() => { newChats.push(chat) } - currentChats = newChats + currentChats = newChats.filter( + c => + // initial state, means non connected + typeof pubToFeed[c.recipientPublicKey] !== 'undefined' + ) notifyChatsListeners() }, 750)