mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 15:37:03 +03:00
Resolve #679
This commit is contained in:
parent
48f4e51dc5
commit
28a70ccc8e
1 changed files with 21 additions and 31 deletions
|
|
@ -2,43 +2,26 @@
|
||||||
|
|
||||||
namespace RainLoop\Providers\AddressBook\Classes;
|
namespace RainLoop\Providers\AddressBook\Classes;
|
||||||
|
|
||||||
|
use \Sabre\VObject\Component\VCard;
|
||||||
|
|
||||||
class Contact implements \JsonSerializable
|
class Contact implements \JsonSerializable
|
||||||
{
|
{
|
||||||
/**
|
public string $id = '';
|
||||||
* @var string
|
|
||||||
*/
|
public string $IdContactStr = '';
|
||||||
public $id = '';
|
|
||||||
|
// public string $Display;
|
||||||
|
|
||||||
|
public int $Changed;
|
||||||
|
|
||||||
|
public bool $ReadOnly = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
public $IdContactStr = '';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
// public $Display;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var int
|
|
||||||
*/
|
|
||||||
public $Changed;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
public $ReadOnly = false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
* Used for CardDAV synchronization
|
* Used for CardDAV synchronization
|
||||||
*/
|
*/
|
||||||
public $Etag = '';
|
public string $Etag = '';
|
||||||
|
|
||||||
/**
|
protected ?VCard $vCard = null;
|
||||||
* @var \Sabre\VObject\Component\VCard
|
|
||||||
*/
|
|
||||||
protected $vCard = null;
|
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
|
@ -62,8 +45,15 @@ class Contact implements \JsonSerializable
|
||||||
return \array_unique($aResult);
|
return \array_unique($aResult);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
public function setVCard(\Sabre\VObject\Component\VCard $oVCard) : void
|
public function setVCard(VCard $oVCard) : void
|
||||||
{
|
{
|
||||||
|
if ($oVCard->PHOTO && $oVCard->PHOTO->parameters['ENCODING']) {
|
||||||
|
$oVCard->VERSION = '3.0';
|
||||||
|
}
|
||||||
|
if (VCard::VCARD40 != $oVCard->getDocumentType()) {
|
||||||
|
$oVCard = $oVCard->convert(VCard::VCARD40);
|
||||||
|
}
|
||||||
|
|
||||||
// KDE KAddressBook entry and used by SnappyMail
|
// KDE KAddressBook entry and used by SnappyMail
|
||||||
// https://github.com/sabre-io/vobject/issues/589
|
// https://github.com/sabre-io/vobject/issues/589
|
||||||
$oVCard->select('X-CRYPTO')
|
$oVCard->select('X-CRYPTO')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue