Skip to content

Commit ac1d61f

Browse files
Merge pull request #1726 from bjorn3/remove_unused_field
Remove sender_short_name field from zulip::Message
2 parents 9ea655c + f5200c4 commit ac1d61f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/zulip.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ struct Message {
2828
/// stream or group of users). Useful primarily for hashing.
2929
#[allow(unused)]
3030
recipient_id: u64,
31-
sender_short_name: Option<String>,
3231
sender_full_name: String,
3332
sender_email: String,
3433
/// The ID of the stream.
@@ -269,10 +268,7 @@ async fn execute_for_other_user(
269268
.unwrap_or_default();
270269

271270
// At this point, the command has been run.
272-
let sender = match &message_data.sender_short_name {
273-
Some(short_name) => format!("{} ({})", message_data.sender_full_name, short_name),
274-
None => message_data.sender_full_name.clone(),
275-
};
271+
let sender = &message_data.sender_full_name;
276272
let message = format!("{sender} ran `{command}` with output `{output}` as you.");
277273

278274
let res = MessageApiRequest {

0 commit comments

Comments
 (0)