Commit c974a11f authored by Alexander's avatar Alexander Committed by Johannes

Add check to mailbox view

parent 602d5d21
Pipeline #108585252 passed with stages
in 10 minutes and 59 seconds
......@@ -69,7 +69,7 @@
- Redesign for chatbox and messages page !1265 @chriswalg
- Center basket map on Germany if logged out !1249 #740 @alex.simm
- Show correct from/to information in mailboxes !1264 !1239 #603 @alex.simm
- Fix adding members to mailboxes by orga !1255 !1302 #677 @alex.simm
- Fix adding members to mailboxes by orga !1255 !1302 !1308 #677 @alex.simm
- Fix missing translations for MenuBasketsEntry. !1271 #761 @ctwx_ok
- disable delete account buttons for non-orga users !1279 @Caluera
- repaired link to profile in the very first pinwall post #512 !1281 @Caluera
......
......@@ -143,13 +143,15 @@ class MailboxView extends View
$fromToAddresses = json_decode($m['to'], true);
break;
case MailboxFolder::FOLDER_TRASH:
$from = json_decode($m['sender'], true);
if ($this->createMailAddressString($from) == $currentMailboxName) {
// mail was sent
$fromToAddresses = json_decode($m['to'], true);
} else {
// mail was received
$fromToAddresses = [$from];
$from = json_decode($m['sender'], true); // returns null or the input string if parsing fails
if (!is_null($from) && is_array($from)) {
if ($this->createMailAddressString($from) == $currentMailboxName) {
// mail was sent
$fromToAddresses = json_decode($m['to'], true);
} else {
// mail was received
$fromToAddresses = [$from];
}
}
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment