Bugfix: Kolab AddressBook failed due to past changes

This commit is contained in:
the-djmaze 2023-01-03 16:22:57 +01:00
parent e9504baa12
commit 5ff8b28a12
3 changed files with 13 additions and 3 deletions

View file

@ -58,12 +58,12 @@ class KolabAddressBook implements \RainLoop\Providers\AddressBook\AddressBookInt
$xCard = null;
try {
foreach ($oMessage->Attachments() ?: [] as $oAttachment) {
if ('application/vcard+xml' === $oAttachment->MimeType()) {
if ('application/vcard+xml' === $oAttachment->ContentType()) {
$result = $this->MailClient()->MessageMimeStream(function ($rResource) use (&$xCard) {
if (\is_resource($rResource)) {
$xCard = \Sabre\VObject\Reader::readXML($rResource);
}
}, $this->sFolderName, $oMessage->Uid(), $oAttachment->MimeIndex());
}, $this->sFolderName, $oMessage->Uid(), $oAttachment->PartID());
break;
}
}

View file

@ -8,7 +8,7 @@ class KolabPlugin extends \RainLoop\Plugins\AbstractPlugin
RELEASE = '2023-01-03',
CATEGORY = 'Contacts',
DESCRIPTION = 'Use an Address Book of Kolab.',
REQUIRED = '2.24.4';
REQUIRED = '2.24.5';
public function Init() : void
{

View file

@ -107,6 +107,16 @@ class Message implements \JsonSerializable
return $this->Uid;
}
public function HeaderTimeStampInUTC() : int
{
return $this->HeaderTimeStampInUTC;
}
public function Attachments() : ?AttachmentCollection
{
return $this->Attachments;
}
public function Plain() : string
{
return $this->sPlain;