From 9920fb39e566a10c44aa7ead9603ff3d1893a01a Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sun, 3 Jun 2012 14:32:17 -0600 Subject: Debugged implementation of Diaspora relayable_retractions Diaspora "relayable_retraction" is now supported by Friendica. The following should now work: Friendica top-level post: Diaspora comment deleted, disappears in Friendica Friendica comment deleted, disappears in Diaspora Diaspora like retracted, disappears in Friendica Friendica like retracted, disappears in Diaspora Diaspora top-level post: Same There are still exceptions, however. First, Friendica and Diaspora seem to frequently reject comments with an "invalid signature" error. This can probably be fixed. Also, some comments/likes/retractions seem to just disappear on the Diaspora side. In the Diaspora log these seem to be accompanied by a "not a valid object" error, often preceeded by a "received a comment but no corresponding post" error. These seem to be purely internal, since sometimes it works for some Diaspora contacts but not others. --- include/items.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 include/items.php (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php old mode 100644 new mode 100755 index 6b16810b2..4513db1db --- a/include/items.php +++ b/include/items.php @@ -3300,7 +3300,9 @@ function drop_item($id,$interactive = true) { 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); + $handle_baseurl_start = strpos($r['url'],'://') + 3; + $handle_baseurl_length = strpos($r['url'],'/profile') - $handle_baseurl_start; + $handle = $r['nick'] . '@' . substr($r['url'], $handle_baseurl_start, $handle_baseurl_length); $authorsig = ''; } } -- cgit v1.2.3