From ec4a783759f42da0007f70f0072c16743cc1d5c5 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 16 Jul 2021 15:49:21 +0530 Subject: [PATCH] Fix disambiguator - Do not disambiguate name on room rejoin Signed-off-by: RMidhunSuresh --- src/domain/session/rightpanel/members/disambiguator.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/domain/session/rightpanel/members/disambiguator.js b/src/domain/session/rightpanel/members/disambiguator.js index f3fa551b..d6468031 100644 --- a/src/domain/session/rightpanel/members/disambiguator.js +++ b/src/domain/session/rightpanel/members/disambiguator.js @@ -32,9 +32,10 @@ export class Disambiguator { const value = this._map.get(name); if (value) { if (Array.isArray(value)) { + if (value.findIndex(member => member.userId === vm.userId) !== -1) { return; } value.push(vm); return value; - } else { + } else if(vm.userId !== value.userId) { const array = [value, vm] this._map.set(name, array); return array;