From 53b5cbc12a4c2c229b3cc1f9f563f616b442e6e9 Mon Sep 17 00:00:00 2001 From: jikstra Date: Wed, 25 Sep 2019 19:28:17 +0200 Subject: [PATCH] get_filemime() should return an empty string if no mimetype is present and not default to `applicatopm/octet-stream` --- src/message.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/message.rs b/src/message.rs index b6155b6a8..04175defa 100644 --- a/src/message.rs +++ b/src/message.rs @@ -150,9 +150,10 @@ impl Message { if let Some((_, mime)) = guess_msgtype_from_suffix(Path::new(file)) { return mime.to_string(); } + return "application/octet-stream".to_string() } + "".to_string() - "application/octet-stream".to_string() } pub fn get_file(&self, context: &Context) -> Option {