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

master
Denis Kasak 2020-07-01 15:56:29 +02:00
parent eeebb43e32
commit 7abdeed449
1 changed files with 1 additions and 2 deletions

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()),
}
}