Skip to content

Commit 786fef6

Browse files
committed
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 <coding@schilljs.com>
1 parent 1463f93 commit 786fef6

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

apps/dav/lib/CardDAV/Activity/Backend.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ protected function triggerAddressbookActivity(string $action, array $addressbook
129129
$event = $this->activityManager->generateEvent();
130130
$event->setApp('dav')
131131
->setObject('addressbook', (int) $addressbookData['id'])
132-
->setType('addressbook')
132+
->setType('contacts')
133133
->setAuthor($currentUser);
134134

135135
$changedVisibleInformation = array_intersect([
@@ -188,7 +188,7 @@ public function onAddressbookUpdateShares(array $addressbookData, array $shares,
188188
$event = $this->activityManager->generateEvent();
189189
$event->setApp('dav')
190190
->setObject('addressbook', (int) $addressbookData['id'])
191-
->setType('addressbook')
191+
->setType('contacts')
192192
->setAuthor($currentUser);
193193

194194
foreach ($remove as $principal) {
@@ -433,7 +433,7 @@ public function triggerCardActivity(string $action, array $addressbookData, arra
433433
$event = $this->activityManager->generateEvent();
434434
$event->setApp('dav')
435435
->setObject('addressbook', (int) $addressbookData['id'])
436-
->setType('card')
436+
->setType('contacts')
437437
->setAuthor($currentUser);
438438

439439
$users = $this->getUsersForShares($shares);

apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function __construct(IFactory $languageFactory,
7272
* @throws \InvalidArgumentException
7373
*/
7474
public function parse($language, IEvent $event, IEvent $previousEvent = null): IEvent {
75-
if ($event->getApp() !== 'dav' || $event->getType() !== 'addressbook') {
75+
if ($event->getApp() !== 'dav' || $event->getType() !== 'contacts') {
7676
throw new \InvalidArgumentException();
7777
}
7878

apps/dav/lib/CardDAV/Activity/Provider/Card.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function __construct(IFactory $languageFactory,
7474
* @throws \InvalidArgumentException
7575
*/
7676
public function parse($language, IEvent $event, IEvent $previousEvent = null): IEvent {
77-
if ($event->getApp() !== 'dav' || $event->getType() !== 'card') {
77+
if ($event->getApp() !== 'dav' || $event->getType() !== 'contacts') {
7878
throw new \InvalidArgumentException();
7979
}
8080

0 commit comments

Comments
 (0)