aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-06-27 20:07:48 -0700
committerzotlabs <mike@macgirvin.com>2017-06-27 20:07:48 -0700
commitdab00a98e0b450183ef5f6ad9d6f4708e2246695 (patch)
treeda382cfdb2d5904eba1367966ba8c97ecf36ebbb
parent2b2ea40bce41ad8d5688f42e71837a2caca8e9a8 (diff)
downloadvolse-hubzilla-dab00a98e0b450183ef5f6ad9d6f4708e2246695.tar.gz
volse-hubzilla-dab00a98e0b450183ef5f6ad9d6f4708e2246695.tar.bz2
volse-hubzilla-dab00a98e0b450183ef5f6ad9d6f4708e2246695.zip
translate 'favorite' verb to 'like' if it's an ostatus feed
-rw-r--r--include/feedutils.php21
1 files changed, 15 insertions, 6 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index 19b4e27ae..de0cedcc0 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -305,12 +305,6 @@ function get_atom_elements($feed, $item, &$author) {
$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,
// 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']));
}
+ 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.
*/