Skip to content

feat(imp): wire EAS 16.1 counter-proposal accept/decline in iTip UI#68

Merged
TDannhauer merged 5 commits into
FRAMEWORK_6_0from
feat/polish_EAS16.1
Jun 19, 2026
Merged

feat(imp): wire EAS 16.1 counter-proposal accept/decline in iTip UI#68
TDannhauer merged 5 commits into
FRAMEWORK_6_0from
feat/polish_EAS16.1

Conversation

@TDannhauer

Copy link
Copy Markdown
Contributor

Summary

  • Wire organizer accept/decline counter-proposal actions in IMP iTip AJAX handler to new Kronolith registry APIs.
  • Clear counter-proposals on local attendee calendars server-side when the organizer sends METHOD=DECLINECOUNTER, enabling ActiveSync to remove the proposal on iOS.
  • Extend iTip MIME viewer for DECLINECOUNTER and auto-update of METHOD=REQUEST calendar copies.

Motivation

EAS 16.1 counter-proposals arrive as METHOD=COUNTER mail; the organizer responds in IMP webmail. Declining sends METHOD=DECLINECOUNTER mail, 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.php

  • counter-accept: call calendar/acceptCounterProposal instead of calendar/updateAttendee; log errors with Horde::log().
  • counter-decline: call calendar/declineCounterProposal($vevent, $attendeeEmail, true) on organizer calendar, then _sendDeclineCounter().
  • decline-counter: new action for attendee to clear own proposal via calendar/declineCounterProposal($vevent).
  • _sendDeclineCounter(): call Kronolith::applyDeclineCounterToLocalUser() before sending mail (switches to attendee auth, clears proposal + EAS flag).

lib/Mime/Viewer/Itip.php

  • Add AUTO_UPDATE_EVENT_REQUEST constant.
  • REQUEST updates: optional auto-calendar/replace when preference enabled (same pattern as reply auto-update).
  • DECLINECOUNTER: description text, auto-declineCounterProposal when preference enabled, or manual “Remove proposed new time from my calendar” button (decline-counter action).

test/Imp/Unit/Ajax/Imple/ItipRequestCounterTest.php

  • Stub new registry methods.
  • testCounterDecline…: assert declineCounterProposal called with attendee email and $notifyAttendee=true.
  • Rename/adjust accept test for acceptCounterProposal.

Dependencies

Deploy together with:

Package Role
horde/kronolith acceptCounterProposal, declineCounterProposal, applyDeclineCounterToLocalUser, EAS clear flag
horde/activesync Empty ProposedStartTime/ProposedEndTime WBXML on sync export

Test plan

  • vendor/bin/phpunit -c vendor/horde/imp/phpunit.xml.dist test/Imp/Unit/Ajax/Imple/ItipRequestCounterTest.php
  • IMP webmail: open METHOD=COUNTERAccept proposed time / Decline proposed time
  • Decline path: attendee receives DECLINECOUNTER mail and iOS calendar clears proposal after sync (no manual mail action)
  • Attendee opens DECLINECOUNTER in IMP → auto-update or “Remove proposed new time” works
  • METHOD=REQUEST update auto-applies to calendar when preference enabled

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
@TDannhauer TDannhauer requested a review from ralflang June 19, 2026 09:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 new decline-counter attendee action, and attempt to clear local proposal state before sending DECLINECOUNTER mail.
  • Extend iTip MIME viewer to support METHOD=DECLINECOUNTER and optionally auto-apply METHOD=REQUEST updates via calendar/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.

Comment thread lib/Ajax/Imple/ItipRequest.php
Comment thread lib/Ajax/Imple/ItipRequest.php Outdated
Comment thread config/mime_drivers.php
Comment thread test/Imp/Unit/Ajax/Imple/ItipRequestCounterTest.php Outdated
TDannhauer and others added 2 commits June 19, 2026 13:54
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>
@TDannhauer TDannhauer merged commit 8588151 into FRAMEWORK_6_0 Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants