feat(imp): wire EAS 16.1 counter-proposal accept/decline in iTip UI#68
Merged
Conversation
Use Kronolith acceptCounterProposal and declineCounterProposal registry APIs from IMP webmail when the organizer accepts or declines a METHOD=COUNTER message. Clear proposals on local attendee calendars server-side before sending DECLINECOUNTER mail so ActiveSync can remove the proposal on iOS without manual mail handling. - counter-accept: calendar/acceptCounterProposal (replaces updateAttendee) - counter-decline: decline on organizer calendar + notify attendee - decline-counter: attendee clears own proposal from calendar - _sendDeclineCounter: applyDeclineCounterToLocalUser before mail send - Itip viewer: DECLINECOUNTER auto-update and REQUEST auto-replace - ItipRequestCounterTest: assert new registry call paths
Contributor
There was a problem hiding this comment.
Pull request overview
Wires iTip counter-proposal accept/decline flows (EAS 16.1) in IMP to newer Kronolith/registry APIs, adds attendee-side clearing for DECLINECOUNTER, and introduces optional auto-application of REQUEST updates and DECLINECOUNTER effects in the iTip viewer.
Changes:
- Update iTip AJAX handler to call
calendar/acceptCounterProposal/calendar/declineCounterProposal, add newdecline-counterattendee action, and attempt to clear local proposal state before sending DECLINECOUNTER mail. - Extend iTip MIME viewer to support
METHOD=DECLINECOUNTERand optionally auto-applyMETHOD=REQUESTupdates viacalendar/replace. - Update unit tests and add a new mime driver configuration key
auto_update_eventrequest.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
lib/Ajax/Imple/ItipRequest.php |
Switch accept/decline counter-proposal flows to new registry/Kronolith APIs; add attendee “decline-counter” action; clear local proposal state before sending DECLINECOUNTER mail. |
lib/Mime/Viewer/Itip.php |
Add REQUEST auto-update option and new DECLINECOUNTER UI/auto-update behavior. |
config/mime_drivers.php |
Introduce auto_update_eventrequest configuration for REQUEST/DECLINECOUNTER auto-updates. |
test/Imp/Unit/Ajax/Imple/ItipRequestCounterTest.php |
Update test stubs/assertions for new counter-proposal registry calls. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
METHOD=DECLINECOUNTER, enabling ActiveSync to remove the proposal on iOS.DECLINECOUNTERand auto-update ofMETHOD=REQUESTcalendar copies.Motivation
EAS 16.1 counter-proposals arrive as
METHOD=COUNTERmail; the organizer responds in IMP webmail. Declining sendsMETHOD=DECLINECOUNTERmail, but iOS only clears the in-calendar “propose new time” UI after a calendar Sync with empty proposed-time elements — not from reading the mail.IMP must call Kronolith to clear stored proposal metadata and queue the ActiveSync clear flag before (or in addition to) sending DECLINECOUNTER mail, so the attendee device syncs the update without opening the message.
Changes
lib/Ajax/Imple/ItipRequest.phpcounter-accept: callcalendar/acceptCounterProposalinstead ofcalendar/updateAttendee; log errors withHorde::log().counter-decline: callcalendar/declineCounterProposal($vevent, $attendeeEmail, true)on organizer calendar, then_sendDeclineCounter().decline-counter: new action for attendee to clear own proposal viacalendar/declineCounterProposal($vevent)._sendDeclineCounter(): callKronolith::applyDeclineCounterToLocalUser()before sending mail (switches to attendee auth, clears proposal + EAS flag).lib/Mime/Viewer/Itip.phpAUTO_UPDATE_EVENT_REQUESTconstant.REQUESTupdates: optional auto-calendar/replacewhen preference enabled (same pattern as reply auto-update).DECLINECOUNTER: description text, auto-declineCounterProposalwhen preference enabled, or manual “Remove proposed new time from my calendar” button (decline-counteraction).test/Imp/Unit/Ajax/Imple/ItipRequestCounterTest.phptestCounterDecline…: assertdeclineCounterProposalcalled with attendee email and$notifyAttendee=true.acceptCounterProposal.Dependencies
Deploy together with:
acceptCounterProposal,declineCounterProposal,applyDeclineCounterToLocalUser, EAS clear flagProposedStartTime/ProposedEndTimeWBXML on sync exportTest plan
vendor/bin/phpunit -c vendor/horde/imp/phpunit.xml.dist test/Imp/Unit/Ajax/Imple/ItipRequestCounterTest.phpMETHOD=COUNTER→ Accept proposed time / Decline proposed timeMETHOD=REQUESTupdate auto-applies to calendar when preference enabled