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
This commit is contained in:
Hypolite Petovan 2020-05-27 08:32:09 -04:00
parent 2d217129b9
commit e20d5ff0b5

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