aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Mail.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-13 20:01:38 -0800
committerzotlabs <mike@macgirvin.com>2016-12-13 20:01:38 -0800
commit0394a3e93957b5bb6574ca95e290e414ed049404 (patch)
tree64763a081485babec1a5ca98ca87cbdf758ced2f /Zotlabs/Module/Mail.php
parent8e400e9e40dc115d81bd03581ea6da3badec5a19 (diff)
downloadvolse-hubzilla-0394a3e93957b5bb6574ca95e290e414ed049404.tar.gz
volse-hubzilla-0394a3e93957b5bb6574ca95e290e414ed049404.tar.bz2
volse-hubzilla-0394a3e93957b5bb6574ca95e290e414ed049404.zip
tag and mention handling in private mail (which required refactoring the bbcode cleanup stuff in mod_item)
Diffstat (limited to 'Zotlabs/Module/Mail.php')
-rw-r--r--Zotlabs/Module/Mail.php15
1 files changed, 5 insertions, 10 deletions
diff --git a/Zotlabs/Module/Mail.php b/Zotlabs/Module/Mail.php
index 24ab2017c..2a8407910 100644
--- a/Zotlabs/Module/Mail.php
+++ b/Zotlabs/Module/Mail.php
@@ -23,10 +23,12 @@ class Mail extends \Zotlabs\Web\Controller {
$rstr = ((x($_REQUEST,'messagerecip')) ? notags(trim($_REQUEST['messagerecip'])) : '');
$preview = ((x($_REQUEST,'preview')) ? intval($_REQUEST['preview']) : 0);
$expires = ((x($_REQUEST,'expires')) ? datetime_convert(date_default_timezone_get(),'UTC', $_REQUEST['expires']) : NULL_DATE);
-
-
if($preview) {
+
+ $body = cleanup_bbcode($body);
+ $results = linkify_tags($a, $body, local_channel());
+
if(preg_match_all('/(\[attachment\](.*?)\[\/attachment\])/',$body,$match)) {
$attachments = array();
foreach($match[2] as $mtch) {
@@ -45,18 +47,11 @@ class Mail extends \Zotlabs\Web\Controller {
$body = trim(str_replace($match[1],'',$body));
}
}
-logger('previewing');
+
echo json_encode(['preview' => smilies(bbcode($body))]);
killme();
}
-
-
-
-
-
-
-
// If we have a raw string for a recipient which hasn't been auto-filled,
// it means they probably aren't in our address book, hence we don't know
// if we have permission to send them private messages.