Whether a message with this [`Viewtype`] should have a file attachment.
(&self)
| 2319 | impl Viewtype { |
| 2320 | /// Whether a message with this [`Viewtype`] should have a file attachment. |
| 2321 | pub fn has_file(&self) -> bool { |
| 2322 | match self { |
| 2323 | Viewtype::Unknown => false, |
| 2324 | Viewtype::Text => false, |
| 2325 | Viewtype::Image => true, |
| 2326 | Viewtype::Gif => true, |
| 2327 | Viewtype::Sticker => true, |
| 2328 | Viewtype::Audio => true, |
| 2329 | Viewtype::Voice => true, |
| 2330 | Viewtype::Video => true, |
| 2331 | Viewtype::File => true, |
| 2332 | Viewtype::Call => false, |
| 2333 | Viewtype::Webxdc => true, |
| 2334 | Viewtype::Vcard => true, |
| 2335 | } |
| 2336 | } |
| 2337 | } |
| 2338 | |
| 2339 | #[cfg(test)] |
no outgoing calls
no test coverage detected