From: Michael Date: Wed, 3 May 2017 19:55:33 +0000 (+0000) Subject: Retraction does now work as well X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a9c263a375746056eaff6f320d2917ff90d12c31;p=friendica.git Retraction does now work as well --- diff --git a/include/diaspora.php b/include/diaspora.php index 121357829a..7e82ecc795 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -2379,11 +2379,16 @@ class Diaspora { return false; } + if (!isset($contact["url"])) { + $contact["url"] = $person["url"]; + } + $r = q("SELECT `id`, `parent`, `parent-uri`, `author-link` FROM `item` WHERE `guid` = '%s' AND `uid` = %d AND NOT `file` LIKE '%%[%%' LIMIT 1", dbesc($target_guid), intval($importer["uid"]) ); if (!$r) { + logger("Target guid ".$target_guid." was not found for user ".$importer["uid"]); return false; } @@ -2429,7 +2434,7 @@ class Diaspora { $target_type = notags(unxmlify($data->target_type)); $contact = self::contact_by_handle($importer["uid"], $sender); - if (!$contact) { + if (!$contact AND (in_array($target_type, array("Contact", "Person")))) { logger("cannot find contact for sender: ".$sender." and user ".$importer["uid"]); return false; } @@ -2442,7 +2447,7 @@ class Diaspora { case "Post": // "Post" will be supported in a future version case "Reshare": case "StatusMessage": - return self::item_retraction($importer, $contact, $data);; + return self::item_retraction($importer, $contact, $data); case "Contact": case "Person":