mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Merge pull request #35973 from nextcloud/fix/hook-into-event-lifecycle
Hook into sabre event lifecycle for iMip Messages
This commit is contained in:
commit
c2b6922c33
2 changed files with 5 additions and 4 deletions
|
|
@ -229,7 +229,7 @@ class CalendarImpl implements ICreateFromString, IHandleImipMessage {
|
|||
$iTipMessage->component = 'VEVENT';
|
||||
$iTipMessage->sequence = isset($vEvent->{'SEQUENCE'}) ? (int)$vEvent->{'SEQUENCE'}->getValue() : 0;
|
||||
$iTipMessage->message = $vObject;
|
||||
$schedulingPlugin->scheduleLocalDelivery($iTipMessage);
|
||||
$server->server->emit('schedule', [$iTipMessage]);
|
||||
}
|
||||
|
||||
public function getInvitationResponseServer(): InvitationResponseServer {
|
||||
|
|
|
|||
|
|
@ -168,9 +168,6 @@ EOF;
|
|||
$schedulingPlugin = $this->createMock(Plugin::class);
|
||||
$iTipMessage = $this->getITipMessage($message);
|
||||
$iTipMessage->recipient = "mailto:lewis@stardew-tent-living.com";
|
||||
$schedulingPlugin->expects(self::once())
|
||||
->method('scheduleLocalDelivery')
|
||||
->with($iTipMessage);
|
||||
|
||||
$server = $this->createMock(Server::class);
|
||||
$server->expects($this->any())
|
||||
|
|
@ -180,6 +177,8 @@ EOF;
|
|||
['acl', $aclPlugin],
|
||||
['caldav-schedule', $schedulingPlugin]
|
||||
]);
|
||||
$server->expects(self::once())
|
||||
->method('emit');
|
||||
|
||||
$invitationResponseServer = $this->createPartialMock(InvitationResponseServer::class, ['getServer', 'isExternalAttendee']);
|
||||
$invitationResponseServer->server = $server;
|
||||
|
|
@ -224,6 +223,8 @@ EOF;
|
|||
['acl', $aclPlugin],
|
||||
['caldav-schedule', $schedulingPlugin]
|
||||
]);
|
||||
$server->expects(self::never())
|
||||
->method('emit');
|
||||
|
||||
$invitationResponseServer = $this->createPartialMock(InvitationResponseServer::class, ['getServer']);
|
||||
$invitationResponseServer->server = $server;
|
||||
|
|
|
|||
Loading…
Reference in a new issue