mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-27 05:11:32 +00:00
Also read post's community from audience
This commit is contained in:
parent
6ae7a5aebc
commit
3bc61dd40d
1 changed files with 7 additions and 1 deletions
|
@ -243,7 +243,11 @@ impl InCommunity for Page {
|
|||
break c;
|
||||
}
|
||||
} else {
|
||||
Err(LemmyErrorType::NoCommunityFoundInCc)?
|
||||
let audience = self
|
||||
.audience
|
||||
.clone()
|
||||
.ok_or(LemmyErrorType::NoCommunityFoundInCc)?;
|
||||
break audience.dereference(context).await?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -256,6 +260,8 @@ impl InCommunity for Page {
|
|||
.await?
|
||||
}
|
||||
};
|
||||
|
||||
// TODO: doesnt make sense to do this here as were checking audience against itself
|
||||
if let Some(audience) = &self.audience {
|
||||
verify_community_matches(audience, community.actor_id.clone())?;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue