From b6b17684612ae2bb878ef9ce72fb7a67b8660924 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 26 Jan 2020 18:11:53 +0100 Subject: [PATCH] Recognize text/plain ICS as text/calendar --- .../main/java/eu/faircode/email/EntityAttachment.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EntityAttachment.java b/app/src/main/java/eu/faircode/email/EntityAttachment.java index 82f6fa1631..a7a2dfeb53 100644 --- a/app/src/main/java/eu/faircode/email/EntityAttachment.java +++ b/app/src/main/java/eu/faircode/email/EntityAttachment.java @@ -181,12 +181,13 @@ public class EntityAttachment { if ("eml".equals(extension)) return "message/rfc822"; - if ("text/plain".equals(type) && - "ovpn".equals(extension)) + if ("text/plain".equals(type) && "ics".equals(extension)) + return "text/calendar"; + + if ("text/plain".equals(type) && "ovpn".equals(extension)) return "application/x-openvpn-profile"; - if ("application/zip".equals(type) || - "application/octet-stream".equals(type)) { + if ("application/zip".equals(type) || "application/octet-stream".equals(type)) { if ("log".equalsIgnoreCase(extension)) return "text/plain";