From ef8ad9f1ede56c80ba0cc13298511d7943e04894 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 16 Sep 2017 18:23:24 +0000 Subject: [PATCH] Diaspora: Sending retractions only worked for posts - nor for comments or likes --- include/diaspora.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/diaspora.php b/include/diaspora.php index 8bfba6eff4..ad1691ba4a 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -3525,7 +3525,14 @@ class Diaspora { $itemaddr = self::handle_from_contact($item["contact-id"], $item["gcontact-id"]); $msg_type = "retraction"; - $target_type = "Post"; + + if ($item['id'] == $item['parent']) { + $target_type = "Post"; + } elseif ($item["verb"] == ACTIVITY_LIKE) { + $target_type = "Like"; + } else { + $target_type = "Comment"; + } $message = array("author" => $itemaddr, "target_guid" => $item['guid'], -- 2.39.5