diff options
author | zotlabs <mike@macgirvin.com> | 2017-03-29 16:41:27 -0700 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-03-30 11:54:07 +0200 |
commit | 5219c4a09ae3ffe3f91abf7d6f58fb8eeb4a116e (patch) | |
tree | 7b9bc058b7432a998b93beb5516d649f60d9ca80 /Zotlabs/Module/Mail.php | |
parent | 4da65183e0c887551884658d35707df6a3ace5e4 (diff) | |
download | volse-hubzilla-5219c4a09ae3ffe3f91abf7d6f58fb8eeb4a116e.tar.gz volse-hubzilla-5219c4a09ae3ffe3f91abf7d6f58fb8eeb4a116e.tar.bz2 volse-hubzilla-5219c4a09ae3ffe3f91abf7d6f58fb8eeb4a116e.zip |
when clicking a notification to view a private mail message, actually view that message instead of the most recent.
Diffstat (limited to 'Zotlabs/Module/Mail.php')
-rw-r--r-- | Zotlabs/Module/Mail.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Zotlabs/Module/Mail.php b/Zotlabs/Module/Mail.php index 459ce5acf..53303816b 100644 --- a/Zotlabs/Module/Mail.php +++ b/Zotlabs/Module/Mail.php @@ -296,6 +296,10 @@ class Mail extends \Zotlabs\Web\Controller { return $o; } + + $last_message = private_messages_list(local_channel(), $mailbox, 0, 1); + + $mid = ((argc() > 2) && (intval(argv(2)))) ? argv(2) : $last_message[0]['id']; switch(argv(1)) { case 'combined': @@ -309,12 +313,15 @@ class Mail extends \Zotlabs\Web\Controller { break; default: $mailbox = 'combined'; + + // notifications direct to mail/nn + + if(intval(argv(1))) + $mid = intval(argv(1)); break; } - $last_message = private_messages_list(local_channel(), $mailbox, 0, 1); - $mid = ((argc() > 2) && (intval(argv(2)))) ? argv(2) : $last_message[0]['id']; $plaintext = true; |