return false;
// This will work for new Diaspora servers and Friendica servers from 3.5
- $source_url = $server."/fetch/post/".$guid;
+ $source_url = $server."/fetch/post/".urlencode($guid);
+
logger("Fetch post from ".$source_url, LOGGER_DEBUG);
$envelope = fetch_url($source_url);
// This will work for older Diaspora and Friendica servers
if (!$x) {
- $source_url = $server."/p/".$guid.".xml";
+ $source_url = $server."/p/".urlencode($guid).".xml";
logger("Fetch post from ".$source_url, LOGGER_DEBUG);
$x = fetch_url($source_url);
if(substr($uri,0,4) === 'http') {
$acct = false;
- $name = basename($uri);
+ $name = ltrim(basename($uri), '~');
} else {
$acct = true;
$local = str_replace('acct:', '', $uri);
* @return array Diaspora data
*/
private static function diaspora($webfinger) {
-
$hcard_url = "";
$data = array();
foreach ($webfinger["links"] as $link) {
foreach ($webfinger["aliases"] as $alias) {
if (normalise_link($alias) != normalise_link($data["url"]) && ! strstr($alias, "@")) {
$data["alias"] = $alias;
+ } elseif (substr($alias, 0, 5) == 'acct:') {
+ $data["addr"] = substr($alias, 5);
}
}
}