]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix carddav activities 33651/head
authorJoas Schilling <coding@schilljs.com>
Fri, 19 Aug 2022 08:04:32 +0000 (10:04 +0200)
committerJoas Schilling <coding@schilljs.com>
Tue, 23 Aug 2022 06:53:16 +0000 (08:53 +0200)
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 <coding@schilljs.com>
apps/dav/lib/CardDAV/Activity/Backend.php
apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php
apps/dav/lib/CardDAV/Activity/Provider/Card.php

index b713284e182d6651e5f31d6c4b1ae39b010494d6..554b32c9ffd392ed7c011b01344455b521638322 100644 (file)
@@ -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);
index be18fba96cc414db1e611db71b5b530af8a3a30e..0f4acaaa434f922004e1adf98ec835ab8693ead0 100644 (file)
@@ -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();
                }
 
index 9c909ae9bcd27e5a793eac64070cfb0196580f82..e2abdda161a16f852a79a4434ff392406edda537 100644 (file)
@@ -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();
                }