]> git.mxchange.org Git - friendica.git/commitdiff
convert received ostatus unfollow verb to activity streams stop-following
authorFriendika <info@friendika.com>
Tue, 4 Jan 2011 10:20:00 +0000 (02:20 -0800)
committerFriendika <info@friendika.com>
Tue, 4 Jan 2011 10:20:00 +0000 (02:20 -0800)
include/items.php

index 0c055f5711a432d142fc58a233c7012d78eb4f19..61bc0c5d77651ccc0893c287e0ced7d26b1e5cde 100644 (file)
@@ -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');