From 236474da0bf765f877ee38d9682a95b0b7f98658 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 4 Jan 2011 02:20:00 -0800 Subject: [PATCH] convert received ostatus unfollow verb to activity streams stop-following --- include/items.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/items.php b/include/items.php index 0c055f5711..61bc0c5d77 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');