handle poco nicknames in Ostatus_profile
This commit is contained in:
parent
b79d4ed6a1
commit
75fdef2092
|
@ -832,7 +832,9 @@ class Ostatus_profile extends Memcached_DataObject
|
||||||
|
|
||||||
protected static function getActivityObjectNickname($object, $hints=array())
|
protected static function getActivityObjectNickname($object, $hints=array())
|
||||||
{
|
{
|
||||||
// XXX: check whatever PoCo calls a nickname first
|
if (!empty($object->nickname)) {
|
||||||
|
return common_nicknamize($object->nickname);
|
||||||
|
}
|
||||||
|
|
||||||
// Try the definitive ID
|
// Try the definitive ID
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,12 @@ if (!defined('STATUSNET')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class PoCo
|
||||||
|
{
|
||||||
|
const NS = 'http://portablecontacts.net/spec/1.0';
|
||||||
|
const USERNAME = 'preferredUsername';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utilities for turning DOMish things into Activityish things
|
* Utilities for turning DOMish things into Activityish things
|
||||||
*
|
*
|
||||||
|
@ -320,6 +326,7 @@ class ActivityObject
|
||||||
|
|
||||||
// @fixme we may have multiple avatars with different resolutions specified
|
// @fixme we may have multiple avatars with different resolutions specified
|
||||||
$this->avatar = ActivityUtils::getLink($element, 'avatar');
|
$this->avatar = ActivityUtils::getLink($element, 'avatar');
|
||||||
|
$this->nickname = ActivityUtils::childContent($element, PoCo::USERNAME, PoCo::NS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user