aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-01-04 02:20:00 -0800
committerFriendika <info@friendika.com>2011-01-04 02:20:00 -0800
commit236474da0bf765f877ee38d9682a95b0b7f98658 (patch)
tree5b80508e38672f4aa434451d963ab441fc540793 /include/items.php
parent15c81716e8cbb916e9bfca5f0d519d9df5baa063 (diff)
downloadvolse-hubzilla-236474da0bf765f877ee38d9682a95b0b7f98658.tar.gz
volse-hubzilla-236474da0bf765f877ee38d9682a95b0b7f98658.tar.bz2
volse-hubzilla-236474da0bf765f877ee38d9682a95b0b7f98658.zip
convert received ostatus unfollow verb to activity streams stop-following
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index 0c055f571..61bc0c5d7 100644
--- a/include/items.php
+++ b/include/items.php
@@ -420,9 +420,19 @@ function get_atom_elements($feed,$item) {
$rawverb = $item->get_item_tags(NAMESPACE_ACTIVITY, 'verb');
+
// select between supported verbs
- if($rawverb)
+
+ if($rawverb) {
$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;
+
+
$rawobj = $item->get_item_tags(NAMESPACE_ACTIVITY, 'object');