Remove ID map in pad chat to save network and CPU usage

pull/1/head
yflory 4 years ago
parent 79f1f939d7
commit e6b11c3748

@ -537,6 +537,15 @@ define([
if (peer === hk) { return; } if (peer === hk) { return; }
if (channel.readOnly) { 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 // Join event will be sent once we are able to ID this peer
var myData = createData(proxy); var myData = createData(proxy);
delete myData.channel; delete myData.channel;

Loading…
Cancel
Save