Skip to content

Commit

Permalink
feat: MsgId::get_info(): Report original filename as well
Browse files Browse the repository at this point in the history
  • Loading branch information
iequidoo committed May 23, 2024
1 parent 66a5ebd commit 0610b7d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,12 @@ WHERE id=?;

if let Some(path) = msg.get_file(context) {
let bytes = get_filebytes(context, &path).await?;
ret += &format!("\nFile: {}, {} bytes\n", path.display(), bytes);
ret += &format!(
"\nFile: {}, name: {}, {} bytes\n",
path.display(),
msg.get_filename().unwrap_or_default(),
bytes
);
}

if msg.viewtype != Viewtype::Text {
Expand Down

0 comments on commit 0610b7d

Please sign in to comment.