From bc6aded074156ec81084334a4d6aa58bc0f37a68 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 29 May 2023 18:16:38 +0000 Subject: fix a possible privacy mismatch --- Zotlabs/Lib/Activity.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index c2acff83f..8f5f385ef 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -3131,6 +3131,16 @@ class Activity { } } + // private conversation, but this comment went rogue and was published publicly + // hide it from everybody except the channel owner + + if (intval($parent[0]['item_private'])) { + if (!intval($item['item_private'])) { + $item['item_private'] = intval($parent_item['item_private']); + $item['allow_cid'] = '<' . $channel['channel_hash'] . '>'; + $item['allow_gid'] = $item['deny_cid'] = $item['deny_gid'] = ''; + } + } } // An ugly and imperfect way to recognise a mastodon direct message -- cgit v1.2.3