fix(calendar): allow editing own events when Stalwart omits isOrigin
Publish Docker Image / prepare (push) Successful in 3s
Publish Docker Image / build (linux/amd64, ubuntu-latest) (push) Failing after 10s
Publish Docker Image / build (linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Publish Docker Image / merge (push) Canceled after 0s
Publish Docker Image / prepare (push) Successful in 3s
Publish Docker Image / build (linux/amd64, ubuntu-latest) (push) Failing after 10s
Publish Docker Image / build (linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Publish Docker Image / merge (push) Canceled after 0s
This commit is contained in:
@@ -182,7 +182,8 @@ export function EventDetailPopover({
|
||||
|
||||
const isAttendeeMode = useMemo(() => {
|
||||
if (!event.participants) return false;
|
||||
return !event.isOrigin && !userIsOrganizer;
|
||||
if (userIsOrganizer) return false;
|
||||
return event.isOrigin === false;
|
||||
}, [event, userIsOrganizer]);
|
||||
|
||||
const userParticipantId = useMemo(
|
||||
|
||||
@@ -227,7 +227,12 @@ export function EventModal({
|
||||
|
||||
const isAttendeeMode = useMemo(() => {
|
||||
if (!event || !event.participants) return false;
|
||||
return !event.isOrigin && !userIsOrganizer;
|
||||
// Only enter attendee (read-only + RSVP) mode when we are definitively NOT
|
||||
// the organizer AND the event explicitly did not originate from this
|
||||
// account. Stalwart may omit `isOrigin`, so treat a missing value as "ours"
|
||||
// (editable) rather than locking the user out of their own events.
|
||||
if (userIsOrganizer) return false;
|
||||
return event.isOrigin === false;
|
||||
}, [event, userIsOrganizer]);
|
||||
|
||||
const userParticipantId = useMemo(() => {
|
||||
|
||||
Reference in New Issue
Block a user