refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\DAV\Backend\CalDAV;
|
||||
|
||||
use Sabre\DAV\Server as SabreServer;
|
||||
use Sabre\CalDAV\Plugin as CalDAVPlugin;
|
||||
use Sabre\DAV\Sync\Plugin as DAVSyncPlugin;
|
||||
use App\Http\Controllers\DAV\Backend\IDAVBackend;
|
||||
use App\Http\Controllers\DAV\Backend\SyncDAVBackend;
|
||||
use App\Http\Controllers\DAV\DAVACL\PrincipalBackend;
|
||||
|
||||
abstract class AbstractCalDAVBackend implements ICalDAVBackend, IDAVBackend
|
||||
{
|
||||
use SyncDAVBackend;
|
||||
|
||||
/**
|
||||
* Get description array.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
$token = DAVSyncPlugin::SYNCTOKEN_PREFIX.$this->refreshSyncToken(null)->id;
|
||||
|
||||
return [
|
||||
'id' => $this->backendUri(),
|
||||
'uri' => $this->backendUri(),
|
||||
'principaluri' => PrincipalBackend::getPrincipalUser($this->user),
|
||||
'{DAV:}sync-token' => $token,
|
||||
'{'.SabreServer::NS_SABREDAV.'}sync-token' => $token,
|
||||
'{'.CalDAVPlugin::NS_CALENDARSERVER.'}getctag' => $token,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the new exported version of the object.
|
||||
*
|
||||
* @param mixed $obj
|
||||
* @return string
|
||||
*/
|
||||
abstract protected function refreshObject($obj): string;
|
||||
}
|
||||
Reference in New Issue
Block a user