]> git.mxchange.org Git - friendica.git/blobdiff - include/bbcode.php
Add a group with one click
[friendica.git] / include / bbcode.php
index 639d90cf4b7ee6bf5ecb9325b9bfe00894c6b3fc..c2ebf35e6308b7464359a8af2b3efe36d13628f7 100644 (file)
@@ -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);