-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: SebastianKrupinski <[email protected]>
- Loading branch information
1 parent
920d127
commit 2056f1a
Showing
5 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
diff --git a/lib/CalDAV/Schedule/Plugin.php b/lib/CalDAV/Schedule/Plugin.php | ||
index 5e56596101..5bca56d47e 100644 | ||
--- a/lib/CalDAV/Schedule/Plugin.php | ||
+++ b/lib/CalDAV/Schedule/Plugin.php | ||
@@ -25,6 +25,7 @@ | ||
use Sabre\VObject; | ||
use Sabre\VObject\Component\VCalendar; | ||
use Sabre\VObject\ITip; | ||
+use Sabre\VObject\ITip\Broker; | ||
use Sabre\VObject\ITip\Message; | ||
use Sabre\VObject\Reader; | ||
|
||
@@ -389,7 +390,7 @@ public function beforeUnbind($path) | ||
$node->getOwner() | ||
); | ||
|
||
- $broker = new ITip\Broker(); | ||
+ $broker = $this->createITipBroker(); | ||
$messages = $broker->parseEvent(null, $addresses, $node->get()); | ||
|
||
foreach ($messages as $message) { | ||
@@ -500,7 +501,7 @@ public function scheduleLocalDelivery(ITip\Message $iTipMessage) | ||
$isNewNode = true; | ||
} | ||
|
||
- $broker = new ITip\Broker(); | ||
+ $broker = $this->createITipBroker(); | ||
$newObject = $broker->processMessage($iTipMessage, $currentObject); | ||
|
||
$inbox->createFile($newFileName, $iTipMessage->message->serialize()); | ||
@@ -611,7 +612,7 @@ public function getSupportedPrivilegeSet(INode $node, array &$supportedPrivilege | ||
*/ | ||
protected function processICalendarChange($oldObject, VCalendar $newObject, array $addresses, array $ignore = [], &$modified = false) | ||
{ | ||
- $broker = new ITip\Broker(); | ||
+ $broker = $this->createITipBroker(); | ||
$messages = $broker->parseEvent($newObject, $addresses, $oldObject); | ||
|
||
if ($messages) { | ||
@@ -994,4 +995,12 @@ public function getPluginInfo() | ||
'link' => 'http://sabre.io/dav/scheduling/', | ||
]; | ||
} | ||
+ | ||
+ /** | ||
+ * Returns an instance of the iTip\Broker. | ||
+ */ | ||
+ protected function createITipBroker(): Broker | ||
+ { | ||
+ return new Broker(); | ||
+ } | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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