From 83738c0fe7b3ef9ef4cc91bdd24400dfa11bfaca Mon Sep 17 00:00:00 2001 From: Cyrille Bollu Date: Thu, 18 Jul 2019 10:01:02 +0200 Subject: [PATCH] Adds a test on the toArray field in ACore's isPUblic function. Signed-off-by: Cyrille Bollu --- lib/Model/ActivityPub/ACore.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Model/ActivityPub/ACore.php b/lib/Model/ActivityPub/ACore.php index 27c43ae7..42b978bc 100644 --- a/lib/Model/ActivityPub/ACore.php +++ b/lib/Model/ActivityPub/ACore.php @@ -227,7 +227,8 @@ class ACore extends Item implements JsonSerializable { */ public function isPublic(): bool { return ($this->getTo() === self::CONTEXT_PUBLIC - || in_array(self::CONTEXT_PUBLIC, $this->getCcArray())); + || in_array(self::CONTEXT_PUBLIC, $this->getCcArray()) + || in_array(self::CONTEXT_PUBLIC, $this->getToArray())); }