From cde0de965f8f2fde2b289ebcb1c1814ffa303ca6 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sat, 2 Jun 2012 23:56:42 -0600 Subject: first shot at getting like/unlike functions to work consistently --- include/items.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 897036c26..6b16810b2 100644 --- a/include/items.php +++ b/include/items.php @@ -3281,9 +3281,11 @@ function drop_item($id,$interactive = true) { } // Add a relayable_retraction signature for Diaspora. Note that we can't add a target_author_signature - // if the comment/like was deleted by a remote user. That should be ok, because if a remote user is deleting - // the comment/like, that means we're the home of the post, and Diaspora will only + // if the comment was deleted by a remote user. That should be ok, because if a remote user is deleting + // the comment, that means we're the home of the post, and Diaspora will only // check the parent_author_signature of retractions that it doesn't have to relay further + // + // I don't think this function gets called for an "unlike," but I'll check anyway $signed_text = $item['guid'] . ';' . ( ($item['verb'] === ACTIVITY_LIKE) ? 'Like' : 'Comment'); if(local_user() == $item['uid']) { @@ -3296,6 +3298,8 @@ function drop_item($id,$interactive = true) { $item['contact-id'] ); if(count($r)) { + // The below handle only works for NETWORK_DFRN. I think that's ok, because this function + // only handles DFRN deletes $handle = $r['nick'] . '@' . substr($r['url'], strpos($r['url'],'://') + 3, strpos($r['url'],'/profile') - 1); $authorsig = ''; } -- cgit v1.2.3