fix(caldav-delegation): send notification to delegator#60712
Conversation
|
/backport to stable34 |
|
/backport to stable33 |
|
/backport to stable32 |
Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
a2d4fe7 to
d9aec9b
Compare
There was a problem hiding this comment.
Hey,
If I am reading this correctly, you are using a global context class to transport data from the plugin to the event listener. This is a bad idea, in my opinion.
Also this plugin is only really needed in one instance on update, that is wasteful and the calendar object update event already emits the new data:
What you do need is the CalendarObjectUpdatedEvent to also carry previous data, I would extend the event to also emit the previous object data also. It is only emitted in one place so you are save to change it.
I would recommend changing the updateCalendarObject method to first pull the existing record, then updated it and then use can use the array for both new and previous, just replace record in the array with the new data from $extraData
server/apps/dav/lib/CalDAV/CalDavBackend.php
Line 1460 in 8609cd4
| return; | ||
| } | ||
|
|
||
| $oldVCalendar = $this->delegateActionContext->getPrevious(); |
There was a problem hiding this comment.
Please see comments above
Summary
Sends notifications to delegator for actions taken on his behalf by delegate
Testing
Should work out of the box but :
If you need the frontend checkout
If you need trashbin:
Checklist
3. to review, feature component)stable32)AI (if applicable)