X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fbbcode.php;h=c2ebf35e6308b7464359a8af2b3efe36d13628f7;hb=57c47a8e3660b8b968b36ff7b379f51aa398a684;hp=639d90cf4b7ee6bf5ecb9325b9bfe00894c6b3fc;hpb=1f23d691f377cc8c3c2ea444b785d28016f3515b;p=friendica.git diff --git a/include/bbcode.php b/include/bbcode.php index 639d90cf4b..c2ebf35e63 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -619,6 +619,17 @@ function GetProfileUsername($profile, $username, $compact = false, $getnetwork = return($username." (".$diaspora.")"); } + $red = preg_replace("=https?://(.*)/channel/(.*)=ism", "$2@$1", $profile); + if ($red != $profile) { + if ($getnetwork) + // red is identified as Diaspora - friendica can't connect directly to it + return(NETWORK_DIASPORA); + elseif ($compact) + return($red); + else + return($username." (".$red.")"); + } + $StatusnetHost = preg_replace("=https?://(.*)/user/(.*)=ism", "$1", $profile); if ($StatusnetHost != $profile) { $StatusnetUser = preg_replace("=https?://(.*)/user/(.*)=ism", "$2", $profile);