fix: Don't issue a disambiguation in case of a unique display name.

This commit is contained in:
Denis Kasak 2020-07-01 15:56:29 +02:00
parent eeebb43e32
commit 7abdeed449

View file

@ -475,8 +475,7 @@ impl Room {
};
match users_with_same_name.len() {
0 => HashMap::new(),
1 => disambiguate_with(users_with_same_name, |m: &RoomMember| m.name()),
0 | 1 => HashMap::new(),
_ => disambiguate_with(users_with_same_name, |m: &RoomMember| m.unique_name()),
}
}