aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Mail.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-29 16:41:27 -0700
committerzotlabs <mike@macgirvin.com>2017-03-29 16:41:27 -0700
commit198d2ab607a609b5265dcbed5e41e62d431b19c2 (patch)
tree6a8531c881dd1731d9260c63818d4aabd2fef093 /Zotlabs/Module/Mail.php
parentf43428aacf940b84b05e1554cc53e29e60846ae4 (diff)
downloadvolse-hubzilla-198d2ab607a609b5265dcbed5e41e62d431b19c2.tar.gz
volse-hubzilla-198d2ab607a609b5265dcbed5e41e62d431b19c2.tar.bz2
volse-hubzilla-198d2ab607a609b5265dcbed5e41e62d431b19c2.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.php11
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;