From e6b11c37485fb6192beb885e4487c57be390e855 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 5 Mar 2021 16:01:20 +0100 Subject: [PATCH] Remove ID map in pad chat to save network and CPU usage --- www/common/outer/messenger.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/www/common/outer/messenger.js b/www/common/outer/messenger.js index b5aab9ca5..301218aa1 100644 --- a/www/common/outer/messenger.js +++ b/www/common/outer/messenger.js @@ -537,6 +537,15 @@ define([ if (peer === hk) { return; } if (channel.readOnly) { return; } + // XXX review + // Sending myData is used to build a "mapId" object which links + // netflux IDs to a curvePublic/uid. We use this map in friend chat + // to detect is the other user is online and we also use it in team chat + // to show if other team members are online (in the roster section). + // It is not needed in the pad chat for now and only causes useless + // network usage. + if (channel.isPadChat) { return; } + // Join event will be sent once we are able to ID this peer var myData = createData(proxy); delete myData.channel;