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
pull/8697/head
Hypolite Petovan 2020-05-27 08:32:09 -04:00
parent 2d217129b9
commit e20d5ff0b5
1 changed files with 5 additions and 2 deletions

View File

@ -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 = '';
}