From 68926f5f8056c8085453839916409b740cf0ba59 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 19 Aug 2022 10:04:32 +0200 Subject: [PATCH] Fix carddav activities The settings where combined last minute but at the same time the activities where not adjusted to map an existing setting so the filter was not possible to even limit it to the types that the activities had. Signed-off-by: Joas Schilling --- apps/dav/lib/CardDAV/Activity/Backend.php | 6 +++--- apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php | 2 +- apps/dav/lib/CardDAV/Activity/Provider/Card.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/dav/lib/CardDAV/Activity/Backend.php b/apps/dav/lib/CardDAV/Activity/Backend.php index b713284e182..554b32c9ffd 100644 --- a/apps/dav/lib/CardDAV/Activity/Backend.php +++ b/apps/dav/lib/CardDAV/Activity/Backend.php @@ -116,7 +116,7 @@ class Backend { $event = $this->activityManager->generateEvent(); $event->setApp('dav') ->setObject('addressbook', (int) $addressbookData['id']) - ->setType('addressbook') + ->setType('contacts') ->setAuthor($currentUser); $changedVisibleInformation = array_intersect([ @@ -170,7 +170,7 @@ class Backend { $event = $this->activityManager->generateEvent(); $event->setApp('dav') ->setObject('addressbook', (int) $addressbookData['id']) - ->setType('addressbook') + ->setType('contacts') ->setAuthor($currentUser); foreach ($remove as $principal) { @@ -408,7 +408,7 @@ class Backend { $event = $this->activityManager->generateEvent(); $event->setApp('dav') ->setObject('addressbook', (int) $addressbookData['id']) - ->setType('card') + ->setType('contacts') ->setAuthor($currentUser); $users = $this->getUsersForShares($shares); diff --git a/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php b/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php index be18fba96cc..0f4acaaa434 100644 --- a/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php +++ b/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php @@ -72,7 +72,7 @@ class Addressbook extends Base { * @throws \InvalidArgumentException */ public function parse($language, IEvent $event, IEvent $previousEvent = null): IEvent { - if ($event->getApp() !== 'dav' || $event->getType() !== 'addressbook') { + if ($event->getApp() !== 'dav' || $event->getType() !== 'contacts') { throw new \InvalidArgumentException(); } diff --git a/apps/dav/lib/CardDAV/Activity/Provider/Card.php b/apps/dav/lib/CardDAV/Activity/Provider/Card.php index 9c909ae9bcd..e2abdda161a 100644 --- a/apps/dav/lib/CardDAV/Activity/Provider/Card.php +++ b/apps/dav/lib/CardDAV/Activity/Provider/Card.php @@ -74,7 +74,7 @@ class Card extends Base { * @throws \InvalidArgumentException */ public function parse($language, IEvent $event, IEvent $previousEvent = null): IEvent { - if ($event->getApp() !== 'dav' || $event->getType() !== 'card') { + if ($event->getApp() !== 'dav' || $event->getType() !== 'contacts') { throw new \InvalidArgumentException(); } -- 2.39.5