From d27e81ef2aabeca9b33b3ec49c22c4bdb49d41f8 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Sat, 26 Aug 2023 08:50:01 +1000 Subject: [PATCH] translate connections virtual group to followers for the benefit of primitive projects that don't understand aspects/circles or virtual groups --- Code/Lib/Activity.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Code/Lib/Activity.php b/Code/Lib/Activity.php index c72de1873..8ab580370 100644 --- a/Code/Lib/Activity.php +++ b/Code/Lib/Activity.php @@ -1565,7 +1565,19 @@ class Activity $tmp = expand_acl($i['allow_gid']); if ($tmp) { foreach ($tmp as $t) { - $ret[] = z_root() . '/lists/' . $t; + if (str_starts_with($t, 'connections:')) { + $split = explode(':', $t, 2); + $listChannel = Channel::from_hash($split[1]); + if ($listChannel) { + $ret[] = z_root() . '/followers/' . $listChannel['channel_address']; + } + else { + $ret[] = z_root() . '/lists/' . $t; + } + } + else { + $ret[] = z_root() . '/lists/' . $t; + } } } }