-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat(CardDAV): Add Sabre\DAV\IMoveTarget support to OCA\DAV\CardDAV\AddressBook #37326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| } | ||
|
|
||
| try { | ||
| return $this->carddavBackend->moveCard($sourceNode->getAddressbookId(), (int)$this->addressBookInfo['id'], $sourceNode->getUri(), $sourceNode->getOwner()); |
Check notice
Code scanning / Psalm
PossiblyNullArgument
| $sourceShares = $this->getShares($sourceAddressBookId); | ||
| $targetShares = $this->getShares($targetAddressBookId); | ||
| $sourceAddressBookRow = $this->getAddressBookById($sourceAddressBookId); | ||
| $this->dispatcher->dispatchTyped(new CardMovedEvent($sourceAddressBookId, $sourceAddressBookRow, $targetAddressBookId, $targetAddressBookRow, $sourceShares, $targetShares, $object)); |
Check notice
Code scanning / Psalm
PossiblyNullArgument
7ac0d9a to
b4520e9
Compare
|
/rebase |
b4520e9 to
7011490
Compare
|
Psalm isn't happy Drone failure is contacts-menu as usual |
7011490 to
92f90dc
Compare
|
For the psalm issue, I guess I need to update the baseline to add this. Done. For the contacts menu test failure, this time it might be related. Does it fails elsewhere currently? |
92f90dc to
50b652d
Compare
50b652d to
a252526
Compare
|
conflicts |
…ddressBook This allows to just UPDATE the card row instead of deleting it and reinsert it. It's very similar to #30120 for calendars. As we need the addressbookid exposed, this introduces OCA\DAV\CardDAV\Card that extends Sabre's. I chose specifically NOT to auto-inject LoggerInterface in Addressbook like in #30120 because the chain of DI is huge just for ONE simple call and it would break an existing dirty call (OCA\Contacts calling OCA\DAV) of ContactsManager in Contacts: nextcloud/contacts#1722 (in SocialApiService), but this is debatable. Signed-off-by: Thomas Citharel <[email protected]>
a252526 to
13a3ebd
Compare
|
CI failure unrelated afaics |
Summary
This allows to just
UPDATEthe card row instead of deleting it and reinsert it. It's very similar to #30120 for calendars. It's in a transaction as well since there are multiple operations.As we need the
addressbookidexposed, this introducesOCA\DAV\CardDAV\Cardthat extends Sabre's.I chose specifically NOT to auto-inject
LoggerInterfaceinAddressbooklike in #30120 because the chain of DI is huge just for ONE simple call and it would break an existing dirty call (OCA\ContactscallingOCA\DAV) ofContactsManagerin Contacts: nextcloud/contacts#1722 (inSocialApiService), but this is debatable (and we can prioritize making the public interfaces correct first).Checklist