forked from mystiq/hydrogen-web
Fix disambiguator
- Do not disambiguate name on room rejoin Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
66d5f4d1a3
commit
ec4a783759
1 changed files with 2 additions and 1 deletions
|
@ -32,9 +32,10 @@ export class Disambiguator {
|
||||||
const value = this._map.get(name);
|
const value = this._map.get(name);
|
||||||
if (value) {
|
if (value) {
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
|
if (value.findIndex(member => member.userId === vm.userId) !== -1) { return; }
|
||||||
value.push(vm);
|
value.push(vm);
|
||||||
return value;
|
return value;
|
||||||
} else {
|
} else if(vm.userId !== value.userId) {
|
||||||
const array = [value, vm]
|
const array = [value, vm]
|
||||||
this._map.set(name, array);
|
this._map.set(name, array);
|
||||||
return array;
|
return array;
|
||||||
|
|
Loading…
Reference in a new issue