Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/IMAP/MailboxSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
class MailboxSync {
use TTransactional;

private const NON_PERSONAL_NAMESPACE_TYPES = [
Horde_Imap_Client_Data_Namespace::NS_OTHER,
Horde_Imap_Client_Data_Namespace::NS_SHARED,
];

/** @var ITimeFactory */
private $timeFactory;

Expand Down Expand Up @@ -239,7 +244,7 @@ private function createMailboxFromFolder(Account $account, Folder $folder, ?Hord
private function isMailboxShared(?Horde_Imap_Client_Namespace_List $namespaces, Mailbox $mailbox): bool {
foreach (($namespaces ?? []) as $namespace) {
/** @var Horde_Imap_Client_Data_Namespace $namespace */
if ($namespace->type === Horde_Imap_Client_Data_Namespace::NS_OTHER && str_starts_with($mailbox->getName(), $namespace->name)) {
if (in_array($namespace->type, self::NON_PERSONAL_NAMESPACE_TYPES, true) && str_starts_with($mailbox->getName(), $namespace->name)) {
return true;
}
}
Expand Down
Loading