From f5d794824e7629d416a2dd92339cb66cd4ddc6f7 Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 9 Nov 2024 12:07:16 +0100 Subject: [PATCH] fix: activities inherit audience only when addressing activity+object and object has `audience` set --- upub/core/src/traits/address.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upub/core/src/traits/address.rs b/upub/core/src/traits/address.rs index 5d827b3..e7aff75 100644 --- a/upub/core/src/traits/address.rs +++ b/upub/core/src/traits/address.rs @@ -67,7 +67,7 @@ impl Addresser for crate::Context { address_to(self, to, None, Some(object.internal), self.is_local(&object.id), object.published, tx).await }, (Some(activity), Some(object)) => { - let to_activity = BTreeSet::from_iter(expand_addressing(activity.addressed(), None, tx).await?); + let to_activity = BTreeSet::from_iter(expand_addressing(activity.addressed(), object.audience.clone(), tx).await?); let to_object = BTreeSet::from_iter(expand_addressing(object.addressed(), object.audience.clone(), tx).await?); let to_common = to_activity.intersection(&to_object).cloned().collect();