mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
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>
This commit is contained in:
parent
1463f935f0
commit
eab5189abb
4 changed files with 7 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue