forked from alemi/upub
fix: consider both to and cc for activities
This commit is contained in:
parent
ddb1ee7319
commit
75fce425ad
1 changed files with 1 additions and 6 deletions
|
@ -60,12 +60,7 @@ impl Addresser for crate::Context {
|
|||
}
|
||||
|
||||
async fn address_activity(&self, activity: &crate::model::activity::Model, tx: &impl ConnectionTrait) -> Result<(), DbErr> {
|
||||
let mut to = expand_addressing(activity.mentioning(), tx).await?;
|
||||
if !to.iter().any(|x| x == apb::target::PUBLIC)
|
||||
&& activity.addressed().iter().any(|x| x == apb::target::PUBLIC)
|
||||
{
|
||||
to.push(apb::target::PUBLIC.to_string());
|
||||
}
|
||||
let to = expand_addressing(activity.addressed(), tx).await?;
|
||||
address_to(self, to, Some(activity.internal), None, self.is_local(&activity.id), tx).await
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue