diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2022-08-19 12:38:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-19 12:38:34 +0300 |
commit | fdec866a89ce786fb9328899dbb785906facba70 (patch) | |
tree | 4ef7e59cdf6cc5c62b9727e981a2850817eed9c8 | |
parent | 1463f935f05e7b3a520c5ec178b3e2a3e68c670f (diff) | |
parent | eab5189abbd3ff711068eb144f20ef2167047e27 (diff) |
Merge pull request #33617 from nextcloud/bugfix/activity-856/fix-carddav-activities
Fix carddav activities
4 files changed, 7 insertions, 7 deletions
diff --git a/apps/dav/lib/CardDAV/Activity/Backend.php b/apps/dav/lib/CardDAV/Activity/Backend.php index 8c8c643e287..53639f84f84 100644 --- a/apps/dav/lib/CardDAV/Activity/Backend.php +++ b/apps/dav/lib/CardDAV/Activity/Backend.php @@ -129,7 +129,7 @@ class Backend { $event = $this->activityManager->generateEvent(); $event->setApp('dav') ->setObject('addressbook', (int) $addressbookData['id']) - ->setType('addressbook') + ->setType('contacts') ->setAuthor($currentUser); $changedVisibleInformation = array_intersect([ @@ -188,7 +188,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) { @@ -433,7 +433,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(); } diff --git a/apps/dav/tests/unit/CardDAV/Activity/BackendTest.php b/apps/dav/tests/unit/CardDAV/Activity/BackendTest.php index dbc2c3550e7..4f3459233aa 100644 --- a/apps/dav/tests/unit/CardDAV/Activity/BackendTest.php +++ b/apps/dav/tests/unit/CardDAV/Activity/BackendTest.php @@ -226,7 +226,7 @@ class BackendTest extends TestCase { ->willReturnSelf(); $event->expects($this->once()) ->method('setType') - ->with('addressbook') + ->with('contacts') ->willReturnSelf(); $event->expects($this->once()) ->method('setAuthor') @@ -396,7 +396,7 @@ class BackendTest extends TestCase { ->willReturnSelf(); $event->expects($this->once()) ->method('setType') - ->with('card') + ->with('contacts') ->willReturnSelf(); $event->expects($this->once()) ->method('setAuthor') |