From 0f799acd75f2719f4cfca50cc95bd5a80673fde2 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 23 Jul 2020 16:56:30 +0200 Subject: [PATCH] fix multiple accounts could not subscribe for push on the same mailbox --- api/src/Mail/Imap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/Mail/Imap.php b/api/src/Mail/Imap.php index 754c87b4ba..73b8f5643f 100644 --- a/api/src/Mail/Imap.php +++ b/api/src/Mail/Imap.php @@ -1455,7 +1455,8 @@ class Imap extends Horde_Imap_Client_Socket implements Imap\PushIface return false; } try { - $metadata = explode(self::METADATA_SEPARATOR, $this->getMetadata(self::METADATA_MAILBOX, [self::METADATA_NAME])) ?: []; + $metadata = explode(self::METADATA_SEPARATOR, + $this->getMetadata(self::METADATA_MAILBOX, [self::METADATA_NAME])[self::METADATA_MAILBOX][self::METADATA_NAME]) ?: []; $my_token = $this->pushToken($account_id); $my_token_preg = '/^'.$this->pushToken($account_id, '[^@]+').'$/'; foreach($metadata as $key => $token)