Conversation
| foreach ($newObject->ATTENDEE as $attendee) { | ||
| if ($attendee->getValue() === $itipMessage->sender) { | ||
| $attendeeFound = true; | ||
| $attendee['PARTSTAT'] = $partstat; |
There was a problem hiding this comment.
This is matching the upstream: https://github.com/sabre-io/vobject/blob/2104a3ea37e248262617a8acbfe7648d8e2fd8bd/lib/ITip/Broker.php#L437
@SebastianKrupinski do you know why we don't unset RSVP here like for the existing events in the loop before?
There was a problem hiding this comment.
Hey, Just saw this comment. According to the RFC
Parameter Name
RSVP
Purpose
To specify whether there is an expectation of a favor of a reply from the calendar user specified by the property value.
So I would say once we have a reply there is no need for the RSVP
There was a problem hiding this comment.
Pull request overview
Adds a Nextcloud-specific “party crasher” control for CalDAV iTIP REPLY handling, plus unit tests, to prevent/allow adding new attendees from replies based on an X-NC-PARTY-CRASHER flag.
Changes:
- Add custom
processMessageReply()handling inTipBrokerto optionally reject “party crasher” attendees and to generate missing recurring exceptions. - Register
X-NC-PARTY-CRASHERas a typed VObject property viaVCalendar::$propertyMap. - Add unit tests covering allow/disallow/default behavior for single and generated recurring instances.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| apps/dav/lib/CalDAV/TipBroker.php | Implements REPLY processing with party-crasher gating and recurring-instance generation. |
| apps/dav/lib/AppInfo/Application.php | Registers X-NC-PARTY-CRASHER in Sabre VObject’s VCalendar property map at app boot. |
| apps/dav/tests/unit/CalDAV/TipBrokerTest.php | Adds coverage for party-crasher allow/deny/default scenarios (including generated recurrences). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| foreach ($properties as $property) { | ||
| if ($property instanceof Boolean) { | ||
| return $property->getValue() === 'TRUE'; | ||
| } |
There was a problem hiding this comment.
partyCrasher() only checks properties that are instances of Sabre\VObject\Property\Boolean. If the event contains X-NC-PARTY-CRASHER:FALSE but it gets parsed as a generic/unknown property (e.g. if the property map wasn’t initialized before parsing), this method will fall back to true and still allow party crashers. To make this robust, consider also checking the property's string value (case-insensitive) whenever the property exists, not only when it’s a Boolean instance.
| } | |
| } | |
| $value = strtoupper(trim((string)$property->getValue())); | |
| if ($value === 'TRUE' || $value === '1' || $value === 'YES') { | |
| return true; | |
| } | |
| if ($value === 'FALSE' || $value === '0' || $value === 'NO') { | |
| return false; | |
| } |
ChristophWurst
left a comment
There was a problem hiding this comment.
Quick review
In terms of naming we could go with invitation forwarding. That's what we will call it on the UI, and what other platforms (Outlook) call it.
b31b5c5 to
4506059
Compare
AI-assisted: OpenCode (gpt-5.4) Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4506059 to
805866a
Compare
Summary
Calendar: nextcloud/calendar#8222
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)