Merge pull request #1698 from Murena-SAS/dev/fix-set-capabilities

Fix capabilities when THREAD is disabled
This commit is contained in:
Maarten 2024-08-11 12:01:34 +02:00 committed by GitHub
commit ec8da2b72b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -307,7 +307,7 @@ class ImapClient extends \MailSo\Net\NetClient
// Set active capabilities // Set active capabilities
$aList = \array_diff($aList, $this->Settings->disabled_capabilities); $aList = \array_diff($aList, $this->Settings->disabled_capabilities);
if (\in_array('THREAD', $this->Settings->disabled_capabilities)) { if (\in_array('THREAD', $this->Settings->disabled_capabilities)) {
$aList = \array_filter($aList, function ($item) { \str_starts_with($item, 'THREAD='); }); $aList = \array_filter($aList, function ($item) { return !\str_starts_with($item, 'THREAD='); });
} }
} }
$this->aCapa = $aList; $this->aCapa = $aList;