diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-07-31 13:29:55 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-08-02 00:22:20 +0300 |
commit | d73069bc8018c3e8a5880a57203c08fa0e765ad6 (patch) | |
tree | ed8c000b426da1ae34e869e7de395e51be853842 /ui/src/components/mail/view/envelope.rs | |
parent | c17bb24f0dd32fc789bf014434da0d50b0fd69af (diff) |
melib: add Other and OctetStream content types
Diffstat (limited to 'ui/src/components/mail/view/envelope.rs')
-rw-r--r-- | ui/src/components/mail/view/envelope.rs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ui/src/components/mail/view/envelope.rs b/ui/src/components/mail/view/envelope.rs index 532f2756..a6c4bbd0 100644 --- a/ui/src/components/mail/view/envelope.rs +++ b/ui/src/components/mail/view/envelope.rs @@ -435,11 +435,15 @@ impl Component for EnvelopeView { )); return true; } - ContentType::Unsupported { .. } => { + ContentType::Other { ref name, .. } => { let attachment_type = u.mime_type(); let binary = query_default_app(&attachment_type); if let Ok(binary) = binary { - let p = create_temp_file(&decode(u, None), None); + let p = create_temp_file( + &decode(u, None), + name.as_ref().map(|n| n.clone()), + None, + ); Command::new(&binary) .arg(p.path()) .stdin(Stdio::piped()) @@ -459,6 +463,14 @@ impl Component for EnvelopeView { return true; } } + ContentType::OctetStream { .. } => { + context.replies.push_back(UIEvent::StatusEvent( + StatusEvent::DisplayMessage( + "application/octet-stream isn't supported yet".to_string(), + ), + )); + return true; + } ContentType::PGPSignature => { context.replies.push_back(UIEvent::StatusEvent( StatusEvent::DisplayMessage( |