From d9538183bdb7f5d9a1c7c8a35cebd064b976c55c Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 6 Mar 2016 17:47:35 +0100 Subject: [PATCH] Use information about activityschema public mention for Notice scope --- classes/Notice.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/classes/Notice.php b/classes/Notice.php index 7484897679..67336bd3dc 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -931,7 +931,14 @@ class Notice extends Managed_DataObject $act->context = new ActivityContext(); } - $stored->scope = self::figureOutScope($actor, $groups, $scope); + if (array_key_exists('http://activityschema.org/collection/public', $act->context->attention)) { + common_debug('URI "http://activityschema.org/collection/public" was in notice attention, so we scope this public.'); + $stored->scope = Notice::PUBLIC_SCOPE; + // TODO: maybe we should actually keep this? if the saveAttentions thing wants to use it... + unset($act->context->attention['http://activityschema.org/collection/public']); + } else { + $stored->scope = self::figureOutScope($actor, $groups, $scope); + } foreach ($act->categories as $cat) { if ($cat->term) { -- 2.39.5