From e20d5ff0b5bd09aad7467ed6bbed820be41dcbff Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 27 May 2020 08:32:09 -0400 Subject: [PATCH] Fix the event feature disabling logic in Object\Post - Conditions on item network and dislike feature presence were mixed which could have led to unexpected behaviors --- src/Object/Post.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Object/Post.php b/src/Object/Post.php index 8488df000f..8c899683d2 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -380,8 +380,11 @@ class Post } // Disable features that aren't available in several networks - if ($buttons["dislike"] && !in_array($item["network"], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA])) { - $buttons["dislike"] = false; + if (!in_array($item["network"], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA])) { + if ($buttons["dislike"]) { + $buttons["dislike"] = false; + } + $isevent = false; $tagger = ''; }