room: Generate human-readable ID for logs
This commit is contained in:
parent
b064698a27
commit
9d7b31e502
1 changed files with 7 additions and 0 deletions
|
@ -1595,4 +1595,11 @@ impl Room {
|
|||
pub fn to_pill(&self) -> Pill {
|
||||
Pill::for_room(self)
|
||||
}
|
||||
|
||||
/// Get a human-readable ID for this `Room`.
|
||||
///
|
||||
/// This is to identify the room easily in logs.
|
||||
pub fn human_readable_id(&self) -> String {
|
||||
format!("{} ({})", self.display_name(), self.room_id())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue