From f09b7ca40936b8f2891d3dc0317968111eb34fb1 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 9 Sep 2014 23:12:17 -0700 Subject: cross-network mention issues --- include/bb2diaspora.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index c499a046a..d3be22225 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -79,7 +79,7 @@ function share_unshield($m) { function diaspora_mention_callback($matches) { - $webbie = $matches[2]; + $webbie = $matches[2] . '@' . $matches[3]; $link = ''; if($webbie) { $r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash where hubloc_addr = '%s' limit 1", @@ -99,7 +99,10 @@ function diaspora_mention_callback($matches) { if(! $link) $link = 'https://' . $matches[3] . '/u/' . $matches[2]; - return '@[url=' . $link . ']' . trim($matches[1]) . ((substr($matches[0],-1,1) === '+') ? '+' : '') . '[/url]' ; + if($r && $r[0]['hubloc_network'] === 'zot') + return '@[zrl=' . $link . ']' . trim($matches[1]) . ((substr($matches[0],-1,1) === '+') ? '+' : '') . '[/zrl]' ; + else + return '@[url=' . $link . ']' . trim($matches[1]) . ((substr($matches[0],-1,1) === '+') ? '+' : '') . '[/url]' ; } -- cgit v1.2.3