]> git.mxchange.org Git - friendica.git/commitdiff
Fix item.private value in Model\Event::getItemArrayForId
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 25 Jul 2023 20:48:37 +0000 (22:48 +0200)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 25 Jul 2023 20:48:37 +0000 (22:48 +0200)
- The $event array doesn't have a `private` key because the event table doesn't have a `private` field.

src/Model/Event.php

index 0bf18d77690a9cd0b2867cc9fd5884e562605280..6f77832209274a12360fa5ff33c3e63d7800d8d6 100644 (file)
@@ -362,7 +362,7 @@ class Event
                $item['allow_gid']     = $event['allow_gid'];
                $item['deny_cid']      = $event['deny_cid'];
                $item['deny_gid']      = $event['deny_gid'];
-               $item['private']       = intval($event['private'] ?? 0);
+               $item['private']       = $event['allow_cid'] && $event['allow_gid'] && $event['deny_cid'] && $event['deny_gid'] ? 0 : 1;
                $item['visible']       = 1;
                $item['verb']          = Activity::POST;
                $item['object-type']   = Activity\ObjectType::EVENT;