From 479ba82475b81687c6d6dc4355acead16c2f081a Mon Sep 17 00:00:00 2001 From: SebastianKrupinski Date: Sun, 13 Oct 2024 14:11:58 -0400 Subject: [PATCH] fix: allow adding self to shared event Signed-off-by: SebastianKrupinski --- src/components/Editor/Invitees/InviteesList.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Editor/Invitees/InviteesList.vue b/src/components/Editor/Invitees/InviteesList.vue index 7ea3bc614..d986d9098 100644 --- a/src/components/Editor/Invitees/InviteesList.vue +++ b/src/components/Editor/Invitees/InviteesList.vue @@ -255,8 +255,12 @@ export default { alreadyInvitedEmails() { const emails = this.invitees.map(attendee => removeMailtoPrefix(attendee.uri)) + // A user should be able to invite themselves if they are not the organizer const principal = this.principalsStore.getCurrentUserPrincipal - if (principal) { + const organizerUri = this.calendarObjectInstance.organizer?.uri + if (organizerUri) { + emails.push(removeMailtoPrefix(organizerUri)) + } else if (principal) { emails.push(principal.emailAddress) }