From 3f7ee613fcecb57f68d55905fef886c9ad8453d6 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 15 Oct 2015 20:40:24 -0700 Subject: mail sync debugging --- mod/mail.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mod') diff --git a/mod/mail.php b/mod/mail.php index 2fbd96fdb..884c41565 100644 --- a/mod/mail.php +++ b/mod/mail.php @@ -98,6 +98,7 @@ function mail_post(&$a) { $ret = send_message(0, $recipient, $body, $subject, $replyto, $expires); if($ret['success']) { + xchan_mail_query($ret['mail']); build_sync_packet(0,array('conv' => array($ret['conv']),'mail' => array(encode_mail($ret['mail'],true)))); } else { @@ -152,6 +153,14 @@ function mail_content(&$a) { intval(argv(3)), intval(local_channel()) ); + $x = q("select * from mail where id = %d and channel_id = %d", + intval(argv(3)), + intval(local_channel()) + ); + if($x) { + build_sync_packet(local_channel(),array('mail' => encode_mail($x[0],true))); + } + proc_run('php','include/notifier.php','mail',intval(argv(3))); if($r) { -- cgit v1.2.3