From 2be84451d1d1142dc1fac85b5f305a3456a44666 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Thu, 29 Apr 2021 15:59:26 -0400 Subject: [PATCH] Remove unnecessary gun subs (let front handle) --- services/gunDB/contact-api/events/onReceivedReqs.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/services/gunDB/contact-api/events/onReceivedReqs.js b/services/gunDB/contact-api/events/onReceivedReqs.js index 66048e83..83ef71af 100644 --- a/services/gunDB/contact-api/events/onReceivedReqs.js +++ b/services/gunDB/contact-api/events/onReceivedReqs.js @@ -44,22 +44,11 @@ const react = debounce(() => { const newReceivedReqsMap = {} const pubToFeed = Streams.getPubToFeed() - const pubToAvatar = Streams.getPubToAvatar() - const pubToDn = Streams.getPubToDn() for (const [id, req] of Object.entries(currAddressData)) { const inContact = Array.isArray(pubToFeed[req.from]) const isDisconnected = pubToFeed[req.from] === 'disconnected' - if (typeof pubToAvatar[req.from] === 'undefined') { - // eslint-disable-next-line no-empty-function - Streams.onAvatar(() => {}, req.from)() - } - if (typeof pubToDn[req.from] === 'undefined') { - // eslint-disable-next-line no-empty-function - Streams.onDisplayName(() => {}, req.from)() - } - if (!inContact && !isDisconnected) { newReceivedReqsMap[req.from] = { id, @@ -133,8 +122,6 @@ const onReceivedReqs = cb => { } }, user) - Streams.onAvatar(react) - Streams.onDisplayName(react) Streams.onPubToFeed(react) subbed = true