From c779aabfae4e44b3127980758d75b2acc4464e72 Mon Sep 17 00:00:00 2001 From: Naveen Date: Wed, 27 Sep 2023 23:22:42 +0530 Subject: [PATCH] Only allow attendee status modification by owner ACCOUNT_NAME is different from OWNER_ACCOUNT. --- .../calendar/pro/activities/EventActivity.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt index 3fff581c0..bc6f9cfb2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt @@ -1637,7 +1637,7 @@ class EventActivity : SimpleActivity() { private fun updateAttendees() { val currentCalendar = calDAVHelper.getCalDAVCalendars("", true).firstOrNull { it.id == mEventCalendarId } mAttendees.forEach { - it.isMe = it.email == currentCalendar?.accountName + it.isMe = it.email == currentCalendar?.ownerName } mAttendees.sortWith(compareBy @@ -1827,8 +1827,8 @@ class EventActivity : SimpleActivity() { if (mEvent.id == null && isSavingEvent && attendees.isNotEmpty()) { val currentCalendar = calDAVHelper.getCalDAVCalendars("", true).firstOrNull { it.id == mEventCalendarId } - mAvailableContacts.firstOrNull { it.email == currentCalendar?.accountName }?.apply { - attendees = attendees.filter { it.email != currentCalendar?.accountName }.toMutableList() as ArrayList + mAvailableContacts.firstOrNull { it.email == currentCalendar?.ownerName }?.apply { + attendees = attendees.filter { it.email != currentCalendar?.ownerName }.toMutableList() as ArrayList status = Attendees.ATTENDEE_STATUS_ACCEPTED relationship = Attendees.RELATIONSHIP_ORGANIZER attendees.add(this)