translate 'favorite' verb to 'like' if it's an ostatus feed
This commit is contained in:
parent
2b2ea40bce
commit
dab00a98e0
@ -305,12 +305,6 @@ function get_atom_elements($feed, $item, &$author) {
|
|||||||
$res['verb'] = unxmlify($rawverb[0]['data']);
|
$res['verb'] = unxmlify($rawverb[0]['data']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// translate OStatus unfollow to activity streams if it happened to get selected
|
|
||||||
|
|
||||||
if((x($res,'verb')) && ($res['verb'] === 'http://ostatus.org/schema/1.0/unfollow')) {
|
|
||||||
$res['verb'] = ACTIVITY_UNFOLLOW;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// look for a photo. We should check media size and find the best one,
|
// look for a photo. We should check media size and find the best one,
|
||||||
// but for now let's just find any author photo
|
// but for now let's just find any author photo
|
||||||
@ -406,6 +400,21 @@ function get_atom_elements($feed, $item, &$author) {
|
|||||||
$res['app'] = strip_tags(unxmlify($apps[0]['attribs']['']['source']));
|
$res['app'] = strip_tags(unxmlify($apps[0]['attribs']['']['source']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($ostatus_protocol) {
|
||||||
|
|
||||||
|
// translate OStatus unfollow to activity streams if it happened to get selected
|
||||||
|
|
||||||
|
if((x($res,'verb')) && ($res['verb'] === 'http://ostatus.org/schema/1.0/unfollow')) {
|
||||||
|
$res['verb'] = ACTIVITY_UNFOLLOW;
|
||||||
|
}
|
||||||
|
|
||||||
|
// And OStatus 'favorite' is pretty much what we call 'like' on other networks
|
||||||
|
|
||||||
|
if((x($res,'verb')) && ($res['verb'] === ACTIVITY_FAVORITE)) {
|
||||||
|
$res['verb'] = ACTIVITY_LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If there's a copy of the body content which is guaranteed to have survived mangling in transit, use it.
|
* If there's a copy of the body content which is guaranteed to have survived mangling in transit, use it.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user