filter new received reqs if requestor is in disconnected state

This commit is contained in:
Daniel Lugo 2020-07-20 20:03:18 -04:00
parent f84c1d1c93
commit 5daf697888

View file

@ -50,6 +50,7 @@ const react = debounce(() => {
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
@ -60,7 +61,7 @@ const react = debounce(() => {
Streams.onDisplayName(() => {}, req.from)()
}
if (!inContact) {
if (!inContact && !isDisconnected) {
newReceivedReqsMap[req.from] = {
id,
requestorAvatar: pubToAvatar[req.from] || null,