From 4c0049ad5553f602e4076e40cf692512ea1d36a3 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 27 Oct 2017 14:20:31 +0200 Subject: [PATCH] don't log presence of other users as 'joins' when you have first joined --- www/common/toolbar3.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/toolbar3.js b/www/common/toolbar3.js index 29d78e91c..be8e6399f 100644 --- a/www/common/toolbar3.js +++ b/www/common/toolbar3.js @@ -921,6 +921,7 @@ define([ return count; }; + var joined = false; metadataMgr.onChange(function () { var newdata = metadataMgr.getMetadata().users; var netfluxIds = Object.keys(newdata); @@ -949,7 +950,7 @@ define([ return; } for (var k in newdata) { - if (k !== userNetfluxId && netfluxIds.indexOf(k) !== -1) { + if (joined && k !== userNetfluxId && netfluxIds.indexOf(k) !== -1) { if (typeof oldUserData[k] === "undefined") { // if the same uid is already present in the userdata, don't notify if (!userPresent(k, newdata[k], oldUserData)) { @@ -960,6 +961,7 @@ define([ } } } + joined = true; oldUserData = JSON.parse(JSON.stringify(newdata)); }); }