|
|
@ -4461,10 +4461,14 @@ public class MessageHelper {
|
|
|
|
File file = local.getFile(context);
|
|
|
|
File file = local.getFile(context);
|
|
|
|
ICalendar icalendar = CalendarHelper.parse(context, file);
|
|
|
|
ICalendar icalendar = CalendarHelper.parse(context, file);
|
|
|
|
|
|
|
|
|
|
|
|
Method method = icalendar.getMethod();
|
|
|
|
List<VEvent> events = icalendar.getEvents();
|
|
|
|
VEvent event = icalendar.getEvents().get(0);
|
|
|
|
if (events == null || events.size() == 0)
|
|
|
|
|
|
|
|
EntityLog.log(context, "No events");
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
VEvent event = events.get(0);
|
|
|
|
|
|
|
|
|
|
|
|
// https://www.rfc-editor.org/rfc/rfc5546#section-3.2
|
|
|
|
// https://www.rfc-editor.org/rfc/rfc5546#section-3.2
|
|
|
|
|
|
|
|
Method method = icalendar.getMethod();
|
|
|
|
if (method != null && method.isCancel())
|
|
|
|
if (method != null && method.isCancel())
|
|
|
|
CalendarHelper.delete(context, event, message);
|
|
|
|
CalendarHelper.delete(context, event, message);
|
|
|
|
else if (method == null || method.isRequest()) {
|
|
|
|
else if (method == null || method.isRequest()) {
|
|
|
@ -4475,6 +4479,7 @@ public class MessageHelper {
|
|
|
|
EntityLog.log(context, "Tentative event not stored");
|
|
|
|
EntityLog.log(context, "Tentative event not stored");
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
EntityLog.log(context, "Unknown event method=" + method.getValue());
|
|
|
|
EntityLog.log(context, "Unknown event method=" + method.getValue());
|
|
|
|
|
|
|
|
}
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
Log.w(ex);
|
|
|
|
Log.w(ex);
|
|
|
|
db.attachment().setWarning(local.id, Log.formatThrowable(ex));
|
|
|
|
db.attachment().setWarning(local.id, Log.formatThrowable(ex));
|
|
|
|