From 1bfde47e319c5b56f17c7f250bfc976315745aa2 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 9 Mar 2023 09:38:59 +0100 Subject: [PATCH] Added organizer to auto events --- app/src/main/java/eu/faircode/email/CalendarHelper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/CalendarHelper.java b/app/src/main/java/eu/faircode/email/CalendarHelper.java index 19d6a1e2ab..51bbbde5d9 100644 --- a/app/src/main/java/eu/faircode/email/CalendarHelper.java +++ b/app/src/main/java/eu/faircode/email/CalendarHelper.java @@ -45,6 +45,9 @@ import biweekly.util.ICalDate; public class CalendarHelper { static void insert(Context context, ICalendar icalendar, VEvent event, String selectedAccount, String selectedName, EntityMessage message) { + + String organizer = (event.getOrganizer() == null ? null : event.getOrganizer().getEmail()); + String summary = (event.getSummary() == null ? null : event.getSummary().getValue()); String description = (event.getDescription() == null ? null : event.getDescription().getValue()); String location = (event.getLocation() == null ? null : event.getLocation().getValue()); @@ -90,6 +93,8 @@ public class CalendarHelper { values.put(CalendarContract.Events.CALENDAR_ID, calId); if (!TextUtils.isEmpty(uid)) values.put(CalendarContract.Events.UID_2445, uid); + if (!TextUtils.isEmpty(organizer)) + values.put(CalendarContract.Events.ORGANIZER, organizer); values.put(CalendarContract.Events.EVENT_TIMEZONE, TimeZone.getDefault().getID()); values.put(CalendarContract.Events.DTSTART, start.getTime()); values.put(CalendarContract.Events.DTEND, end.getTime()); @@ -108,6 +113,7 @@ public class CalendarHelper { EntityLog.log(context, EntityLog.Type.General, message, "Inserted event" + " id=" + calId + ":" + eventId + " uid=" + uid + + " organizer=" + organizer + " tz=" + TimeZone.getDefault().getID() + " start=" + new Date(start.getTime()) + " end=" + new Date(end.getTime()) +