From 644d6e355828330af85cb0aa6903e90fe6e9e088 Mon Sep 17 00:00:00 2001 From: Josaphat Imani Date: Tue, 19 Nov 2024 13:32:36 +0200 Subject: [PATCH] Fix flags issue breaking email copied from tiki tracker to be read --- modules/imap/hm-imap.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/imap/hm-imap.php b/modules/imap/hm-imap.php index fbb8dbaa8..32811698d 100644 --- a/modules/imap/hm-imap.php +++ b/modules/imap/hm-imap.php @@ -1434,6 +1434,10 @@ public function get_message_headers($uid, $message_part=false, $raw=false) { $results[$vals[0]] = $vals[1]; } } + if ($flags && is_array($results['Flags'])) { + $results['Flags'] = array_unique($results['Flags']); + $results['Flags'] = implode(' ', $results['Flags']); + } if ($status) { return $this->cache_return_val($results, $cache_command); }