Fix disambiguator

- Do not disambiguate name on room rejoin

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-07-16 15:49:21 +05:30
parent 66d5f4d1a3
commit ec4a783759

View file

@ -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;