]> git.mxchange.org Git - friendica.git/commitdiff
Diaspora: Sending retractions only worked for posts - nor for comments or likes
authorMichael <heluecht@pirati.ca>
Sat, 16 Sep 2017 18:23:24 +0000 (18:23 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 16 Sep 2017 18:23:24 +0000 (18:23 +0000)
include/diaspora.php

index 8bfba6eff41d68c96cc0afccd3abc63b0a76172e..ad1691ba4a39504116fd13dd543f8928b786d367 100644 (file)
@@ -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'],