zidify private mail

This commit is contained in:
zotlabs 2016-12-19 14:35:13 -08:00
parent 468fb3c77a
commit 350627988e
2 changed files with 6 additions and 6 deletions

View File

@ -47,8 +47,7 @@ class Mail extends \Zotlabs\Web\Controller {
$body = trim(str_replace($match[1],'',$body)); $body = trim(str_replace($match[1],'',$body));
} }
} }
echo json_encode(['preview' => zidify_links(smilies(bbcode($body)))]);
echo json_encode(['preview' => smilies(bbcode($body))]);
killme(); killme();
} }
@ -110,6 +109,8 @@ class Mail extends \Zotlabs\Web\Controller {
require_once('include/text.php'); require_once('include/text.php');
linkify_tags($a, $body, local_channel()); linkify_tags($a, $body, local_channel());
// I don't think this is used any more.
if($preview) { if($preview) {
$mail = [ $mail = [
'mailbox' => 'outbox', 'mailbox' => 'outbox',
@ -118,8 +119,8 @@ class Mail extends \Zotlabs\Web\Controller {
'from_name' => $channel['xchan_name'], 'from_name' => $channel['xchan_name'],
'from_url' => $channel['xchan_url'], 'from_url' => $channel['xchan_url'],
'from_photo' => $channel['xchan_photo_s'], 'from_photo' => $channel['xchan_photo_s'],
'subject' => smilies(bbcode($subject)), 'subject' => zidify_links(smilies(bbcode($subject))),
'body' => smilies(bbcode($body)), 'body' => zidify_links(smilies(bbcode($body))),
'attachments' => '', 'attachments' => '',
'can_recall' => false, 'can_recall' => false,
'is_recalled' => '', 'is_recalled' => '',
@ -369,7 +370,7 @@ class Mail extends \Zotlabs\Web\Controller {
'to_url' => chanlink_hash($message['to_xchan']), 'to_url' => chanlink_hash($message['to_xchan']),
'to_photo' => $message['to']['xchan_photo_s'], 'to_photo' => $message['to']['xchan_photo_s'],
'subject' => $message['title'], 'subject' => $message['title'],
'body' => smilies(bbcode($message['body'])), 'body' => zidify_links(smilies(bbcode($message['body']))),
'attachments' => $s, 'attachments' => $s,
'delete' => t('Delete message'), 'delete' => t('Delete message'),
'dreport' => t('Delivery report'), 'dreport' => t('Delivery report'),

View File

@ -3088,7 +3088,6 @@ function cleanup_bbcode($body) {
$body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','\red_unescape_codeblock',$body); $body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64code(.*?)\[\/(code)\]/ism','\red_unescape_codeblock',$body); $body = preg_replace_callback('/\[\$b64code(.*?)\[\/(code)\]/ism','\red_unescape_codeblock',$body);
// fix any img tags that should be zmg // fix any img tags that should be zmg
$body = preg_replace_callback('/\[img(.*?)\](.*?)\[\/img\]/ism','\red_zrlify_img_callback',$body); $body = preg_replace_callback('/\[img(.*?)\](.*?)\[\/img\]/ism','\red_zrlify_img_callback',$body);