From 0c24784f5e92e0c8269f255e962312574871f2f0 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 6 Dec 2011 15:24:01 -0800 Subject: include diaspora mentions in personal (requires adding a Diaspora profile url because they don't use ours) --- include/diaspora.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/diaspora.php') diff --git a/include/diaspora.php b/include/diaspora.php index a8fd43024..4f0df1944 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -621,7 +621,16 @@ function diaspora_post($importer,$xml) { } } } - + + $cnt = preg_match_all('/@\[url=(.*?)\[\/url\]/ism',$body,$matches,PREG_SET_ORDER); + if($cnt) { + foreach($matches as $mtch) { + if(strlen($str_tags)) + $str_tags .= ','; + $str_tags .= '@[url=' . $mtch[1] . '[/url]'; + } + } + $datarray['uid'] = $importer['uid']; $datarray['contact-id'] = $contact['id']; $datarray['wall'] = 0; -- cgit v1.2.3