We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 51283a1b authored by Evan Prodromou's avatar Evan Prodromou

try to make a nickname from the user profile url before using the URI

parent db9e57f7
......@@ -1322,9 +1322,19 @@ class Ostatus_profile extends Memcached_DataObject
return $hints['nickname'];
// Try the definitive ID
// Try the profile url (like foo.example.com or example.com/user/foo)
$nickname = self::nicknameFromURI($object->id);
$profileUrl = ($object->link) ? $object->link : $hints['profileurl'];
if (!empty($profileUrl)) {
$nickname = self::nicknameFromURI($profileUrl);
// Try the URI (may be a tag:, http:, acct:, ...
if (empty($nickname)) {
$nickname = self::nicknameFromURI($object->id);
// Try a Webfinger if one was passed (way) down
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment