$guid = System::createGUID(32);
}
- $hostname = self::getApp()->get_hostname();
-
- $user = DBA::selectFirst('user', ['nickname'], ['uid' => $uid]);
-
- $uri = "urn:X-dfrn:" . $hostname . ':' . $user['nickname'] . ':' . $guid;
-
- return $uri;
+ return self::getApp()->get_baseurl() . '/object/' . $guid;
}
/**
if (DBA::isResult($item)) {
return $item["uri"];
} elseif (!$onlyfound) {
- $contact = Contact::getDetailsByAddr($author, 0);
- if (!empty($contact['network'])) {
- $prefix = 'urn:X-' . $contact['network'] . ':';
- } else {
- // This fallback should happen most unlikely
- $prefix = 'urn:X-dspr:';
- }
+ $person = self::personByHandle($author);
- $author_parts = explode('@', $author);
+ $parts = parse_url($person['url']);
+ unset($parts['path']);
+ $host_url = Network::unparseURL($parts);
- return $prefix . $author_parts[1] . ':' . $author_parts[0] . ':'. $guid;
+ return $host_url . '/object/' . $guid;
}
return "";