Skip to content

Commit

Permalink
fixup! fix: allow adding self to shared event
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <[email protected]>
  • Loading branch information
SebastianKrupinski committed Oct 16, 2024
1 parent d5b21e2 commit 005b7be
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/Editor/Invitees/InviteesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,13 @@ export default {
alreadyInvitedEmails() {
const emails = this.invitees.map(attendee => removeMailtoPrefix(attendee.uri))
if (this.calendarObjectInstance.organizer.uri) {
emails.push(removeMailtoPrefix(this.calendarObjectInstance.organizer.uri))
// A user should be able to invite themselves if they are not the organizer
const principal = this.principalsStore.getCurrentUserPrincipal
const organizerUri = this.calendarObjectInstance.organizer?.uri

Check warning on line 260 in src/components/Editor/Invitees/InviteesList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Invitees/InviteesList.vue#L260

Added line #L260 was not covered by tests
if (organizerUri) {
emails.push(removeMailtoPrefix(organizerUri))
} else if (principal) {
emails.push(principal.emailAddress)
}
return emails
Expand Down

0 comments on commit 005b7be

Please sign in to comment.