From e6b67e5fa7d83251893412e09e4179359e5805bc Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Tue, 9 Jun 2020 15:35:43 +0200 Subject: [PATCH] Add short explanation to Room::member_display_name. --- matrix_sdk_base/src/models/room.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/matrix_sdk_base/src/models/room.rs b/matrix_sdk_base/src/models/room.rs index f853aa9f..7fdedd76 100644 --- a/matrix_sdk_base/src/models/room.rs +++ b/matrix_sdk_base/src/models/room.rs @@ -303,6 +303,11 @@ impl Room { } /// Get the disambiguated display name for a member of this room. + /// + /// When displaying a room member's display name, clients *must* use this method to obtain the + /// name instead of displaying the `RoomMember::display_name` directly. This is because + /// multiple users can share the same display name in which case the display name has to be + /// disambiguated. pub fn member_display_name<'a>(&'a self, id: &UserId) -> Option> { self.disambiguated_display_names .get(id)