a bit more background work to support private mail preview

This commit is contained in:
zotlabs 2016-11-08 16:25:36 -08:00
parent 127ed1b188
commit 743cfa13fd

View File

@ -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) {