From 5e24706796395e76eec6b9fd1b435d764e48b969 Mon Sep 17 00:00:00 2001 From: Jonathan Treffler Date: Wed, 12 Jun 2024 14:20:24 +0200 Subject: [PATCH] return calendar node name as push topic --- lib/Dav/ServiceDetectionPlugin.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/Dav/ServiceDetectionPlugin.php b/lib/Dav/ServiceDetectionPlugin.php index 2b323b5..234d265 100644 --- a/lib/Dav/ServiceDetectionPlugin.php +++ b/lib/Dav/ServiceDetectionPlugin.php @@ -27,12 +27,13 @@ declare(strict_types=1); namespace OCA\DavPush\Dav; +use OCA\DavPush\Transport\TransportManager; + use OCP\IUser; use OCP\IUserSession; use OCP\AppFramework\Db\DoesNotExistException; -use OCA\DAV\Connector\Sabre\Node; -use OCA\DavPush\Transport\TransportManager; +use OCA\DAV\CalDAV\Calendar; use Sabre\DAV\INode; use Sabre\DAV\PropFind; @@ -61,9 +62,9 @@ class ServiceDetectionPlugin extends ServerPlugin { return; } - //if (!($node instanceof Node)) { - // return; - //} + if (!($node instanceof Calendar)) { + return; + } $propFind->handle( self::PROPERTY_PUSH_TRANSPORTS, @@ -101,7 +102,7 @@ class ServiceDetectionPlugin extends ServerPlugin { // return "test-return-push"; //}, - "test-return-push-topic" + $node->getName() ); } } \ No newline at end of file