circular logic - we need the mailbox to find the last message so move the code block back where it was, and only set a direct mid if one was specified.
This commit is contained in:
parent
5219c4a09a
commit
181d9a0777
@ -297,9 +297,7 @@ class Mail extends \Zotlabs\Web\Controller {
|
|||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
$last_message = private_messages_list(local_channel(), $mailbox, 0, 1);
|
$direct_mid = 0;
|
||||||
|
|
||||||
$mid = ((argc() > 2) && (intval(argv(2)))) ? argv(2) : $last_message[0]['id'];
|
|
||||||
|
|
||||||
switch(argv(1)) {
|
switch(argv(1)) {
|
||||||
case 'combined':
|
case 'combined':
|
||||||
@ -317,11 +315,18 @@ class Mail extends \Zotlabs\Web\Controller {
|
|||||||
// notifications direct to mail/nn
|
// notifications direct to mail/nn
|
||||||
|
|
||||||
if(intval(argv(1)))
|
if(intval(argv(1)))
|
||||||
$mid = intval(argv(1));
|
$direct_mid = intval(argv(1));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$last_message = private_messages_list(local_channel(), $mailbox, 0, 1);
|
||||||
|
|
||||||
|
$mid = ((argc() > 2) && (intval(argv(2)))) ? argv(2) : $last_message[0]['id'];
|
||||||
|
|
||||||
|
if($direct_mid)
|
||||||
|
$mid = $direct_mid;
|
||||||
|
|
||||||
|
|
||||||
$plaintext = true;
|
$plaintext = true;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user