|
@@ -34,7 +34,6 @@ use OCA\DAV\DAV\Sharing\Plugin;
|
|
|
use OCP\AppFramework\Db\DoesNotExistException;
|
|
|
use OCP\IL10N;
|
|
|
use Sabre\DAV\Exception\NotFound;
|
|
|
-use Sabre\DAV\Exception\NotImplemented;
|
|
|
use Sabre\DAV\PropPatch;
|
|
|
use Sabre\DAVACL\ACLTrait;
|
|
|
use Sabre\DAVACL\IACL;
|
|
@@ -130,8 +129,8 @@ class AddressBook extends ExternalAddressBook implements IACL {
|
|
|
/**
|
|
|
* @inheritDoc
|
|
|
*/
|
|
|
- public function getLastModified() {
|
|
|
- throw new NotImplemented();
|
|
|
+ public function getLastModified(): ?int {
|
|
|
+ return $this->mapper->findLastUpdatedForUserId($this->getUid());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -149,6 +148,7 @@ class AddressBook extends ExternalAddressBook implements IACL {
|
|
|
'principaluri' => $this->principalUri,
|
|
|
'{DAV:}displayname' => $this->l10n->t('Recently contacted'),
|
|
|
'{' . Plugin::NS_OWNCLOUD . '}read-only' => true,
|
|
|
+ '{' . \OCA\DAV\CalDAV\Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($this->getLastModified() ?? 0),
|
|
|
];
|
|
|
}
|
|
|
|