diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-07-18 08:26:03 -0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-18 08:26:03 -0100 |
commit | c5e8f587ccc0e418148fa0db2b385872be160f0b (patch) | |
tree | f3729263741fa113a150b870234035cd18397bfd | |
parent | cb37082dc9a71dcb8d0db44c20ab76abf94fe599 (diff) | |
parent | 83738c0fe7b3ef9ef4cc91bdd24400dfa11bfaca (diff) |
Merge pull request #638 from StCyr/StCyr_Fix_isPublic
Adds a test on the toArray field in ACore's isPublic function.
-rw-r--r-- | lib/Model/ActivityPub/ACore.php | 3 |
1 files changed, 2 insertions, 1 deletions
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())); } |