Repeated items that are transmitted to text based networks now contain the address and name of the original poater.

This commit is contained in:
Michael Vogel 2013-10-20 12:26:27 +02:00
parent f1154cfdd5
commit 661664550d
1 changed files with 4 additions and 4 deletions

View File

@ -343,15 +343,15 @@ function bb_ShareAttributesSimple2($match) {
function GetProfileUsername($profile, $username) { function GetProfileUsername($profile, $username) {
$friendica = preg_replace("=https?://(.*)/profile/(.*)=ism", "$2@$1", $profile); $friendica = preg_replace("=https?://(.*)/profile/(.*)=ism", "$2@$1", $profile);
if ($friendica != $profile) if ($friendica != $profile)
return($friendica); return($friendica." (".$username.")");
$diaspora = preg_replace("=https?://(.*)/u/(.*)=ism", "$2@$1", $profile); $diaspora = preg_replace("=https?://(.*)/u/(.*)=ism", "$2@$1", $profile);
if ($diaspora != $profile) if ($diaspora != $profile)
return($diaspora); return($diaspora." (".$username.")");
$twitter = preg_replace("=https?://twitter.com/(.*)=ism", "$1@twitter.com", $profile); $twitter = preg_replace("=https?://twitter.com/(.*)=ism", "$1@twitter.com", $profile);
if ($twitter != $profile) if ($twitter != $profile)
return($twitter); return($twitter." (".$username.")");
$StatusnetHost = preg_replace("=https?://(.*)/user/(.*)=ism", "$1", $profile); $StatusnetHost = preg_replace("=https?://(.*)/user/(.*)=ism", "$1", $profile);
if ($StatusnetHost != $profile) { if ($StatusnetHost != $profile) {
@ -360,7 +360,7 @@ function GetProfileUsername($profile, $username) {
$UserData = fetch_url("http://".$StatusnetHost."/api/users/show.json?user_id=".$StatusnetUser); $UserData = fetch_url("http://".$StatusnetHost."/api/users/show.json?user_id=".$StatusnetUser);
$user = json_decode($UserData); $user = json_decode($UserData);
if ($user) if ($user)
return($user->screen_name."@".$StatusnetHost); return($user->screen_name."@".$StatusnetHost." (".$username.")");
} }
} }