From 66902c7956eedba02ea54aea6ea7aa417344ffbb Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 30 Dec 2016 22:40:30 +0000 Subject: [PATCH] We now also transmit Dislikes --- include/diaspora.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/diaspora.php b/include/diaspora.php index a6e6e5cf76..edc2f3c85f 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -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 { -- 2.39.5