]> git.mxchange.org Git - friendica.git/commitdiff
We now also transmit Dislikes
authorMichael <heluecht@pirati.ca>
Fri, 30 Dec 2016 22:40:30 +0000 (22:40 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 30 Dec 2016 22:40:30 +0000 (22:40 +0000)
include/diaspora.php

index a6e6e5cf76bc4d6c770811fca463c00744614f8d..edc2f3c85f9cfc3bd27dabeec7b1098d22407134 100644 (file)
@@ -3150,7 +3150,11 @@ class Diaspora {
                $parent = $p[0];
 
                $target_type = ($parent["uri"] === $parent["parent-uri"] ? "Post" : "Comment");
-               $positive = "true";
+               if ($item['verb'] === ACTIVITY_LIKE) {
+                       $positive = "true";
+               } elseif ($item['verb'] === ACTIVITY_DISLIKE) {
+                       $positive = "false";
+               }
 
                return(array("positive" => $positive,
                                "guid" => $item["guid"],
@@ -3251,7 +3255,7 @@ class Diaspora {
                if (in_array($item['verb'], array(ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE))) {
                        $message = self::construct_attend($item, $owner);
                        $type = "event_participation";
-               } elseif($item['verb'] === ACTIVITY_LIKE) {
+               } elseif (in_array($item["verb"], array(ACTIVITY_LIKE, ACTIVITY_DISLIKE))) {
                        $message = self::construct_like($item, $owner);
                        $type = "like";
                } else {