From e468870e8735070fe7454025262a9229b37feb74 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 25 Jul 2023 22:48:37 +0200 Subject: [PATCH] Fix item.private value in Model\Event::getItemArrayForId - The $event array doesn't have a `private` key because the event table doesn't have a `private` field. --- src/Model/Event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Event.php b/src/Model/Event.php index 0bf18d7769..6f77832209 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -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; -- 2.39.5