From 743cfa13fdf53ec0b7afbd7599dfb8b6d20a91b5 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 8 Nov 2016 16:25:36 -0800 Subject: a bit more background work to support private mail preview --- Zotlabs/Module/Mail.php | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Zotlabs/Module/Mail.php b/Zotlabs/Module/Mail.php index a61b02cdf..c767c8e56 100644 --- a/Zotlabs/Module/Mail.php +++ b/Zotlabs/Module/Mail.php @@ -83,10 +83,24 @@ class Mail extends \Zotlabs\Web\Controller { linkify_tags($a, $body, local_channel()); if($preview) { + $mail = [ + 'mailbox' => 'outbox', + 'id' => 0, + 'mid' => 'M0', + 'from_name' => $channel['xchan_name'], + 'from_url' => $channel['xchan_url'], + 'from_photo' => $channel['xchan_photo_s'], + 'subject' => smilies(bbcode($subject)), + 'body' => smilies(bbcode($body)), + 'attachments' => '', + 'can_recall' => false, + 'is_recalled' => '', + 'date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'], 'c') + ]; - - - + echo replace_macros(get_markup_template('mail_conv.tpl'), [ '$mail' => $mail ] ); + killme(); + } if(! $recipient) { -- cgit v1.2.3