fix(cli): keep room users text output a bare roster
The e2e job caught this: adding status and file columns to the text record broke `room_users_lists_who_is_in_the_room`, which asserts the line equals the username. That test encodes a real contract -- the text output is a roster to pipe into other commands -- and reformatting it was scope this change did not need. The statistics stay on the record for `--json`. Reproduced the failure locally against soulfind, then confirmed the same test passing with the fix.
This commit is contained in:
@@ -389,14 +389,11 @@ pub struct RoomMemberRecord {
|
||||
}
|
||||
|
||||
impl Record for RoomMemberRecord {
|
||||
/// The username alone, unchanged by the statistics added alongside it:
|
||||
/// the text line is a roster a caller pipes into other commands, and the
|
||||
/// statistics are there for `--json` to carry.
|
||||
fn text(&self) -> String {
|
||||
let unknown = || "-".to_string();
|
||||
format!(
|
||||
"{}\t{}\t{}",
|
||||
sanitize(&self.user),
|
||||
self.status.clone().unwrap_or_else(unknown),
|
||||
self.shared_files.map_or_else(unknown, |v| v.to_string())
|
||||
)
|
||||
sanitize(&self.user)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user