Follow/Unfollow now works from OStatus.
This commit is contained in:
parent
3457f85833
commit
2b3ebb9c3e
3 changed files with 15 additions and 7 deletions
|
|
@ -4159,9 +4159,12 @@ function new_follower($importer,$contact,$datarray,$item,$sharing = false) {
|
|||
$name = notags(trim($datarray['author-name']));
|
||||
$photo = notags(trim($datarray['author-avatar']));
|
||||
|
||||
$rawtag = $item->get_item_tags(NAMESPACE_ACTIVITY,'actor');
|
||||
if($rawtag && $rawtag[0]['child'][NAMESPACE_POCO]['preferredUsername'][0]['data'])
|
||||
$nick = $rawtag[0]['child'][NAMESPACE_POCO]['preferredUsername'][0]['data'];
|
||||
if (is_object($item)) {
|
||||
$rawtag = $item->get_item_tags(NAMESPACE_ACTIVITY,'actor');
|
||||
if($rawtag && $rawtag[0]['child'][NAMESPACE_POCO]['preferredUsername'][0]['data'])
|
||||
$nick = $rawtag[0]['child'][NAMESPACE_POCO]['preferredUsername'][0]['data'];
|
||||
} else
|
||||
$nick = $item;
|
||||
|
||||
if(is_array($contact)) {
|
||||
if(($contact['network'] == NETWORK_OSTATUS && $contact['rel'] == CONTACT_IS_SHARING)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue