objects::{community::ApubCommunity, person::ApubPerson},
protocol::{
activities::voting::vote::{Vote, VoteType},
objects::{community::ApubCommunity, person::ApubPerson},
protocol::{
activities::voting::vote::{Vote, VoteType},
#[tracing::instrument(skip_all)]
async fn verify(&self, context: &Data<LemmyContext>) -> Result<(), LemmyError> {
#[tracing::instrument(skip_all)]
async fn verify(&self, context: &Data<LemmyContext>) -> Result<(), LemmyError> {
let community = self.community(context).await?;
verify_person_in_community(&self.actor, &community, context).await?;
let community = self.community(context).await?;
verify_person_in_community(&self.actor, &community, context).await?;
- if self.kind == VoteType::Dislike && !enable_downvotes {
+ let enable_federated_downvotes = LocalSite::read(&mut context.pool())
+ .await
+ .map(|l| l.enable_federated_downvotes)
+ .unwrap_or(true);
+ if self.kind == VoteType::Dislike && (!enable_downvotes || !enable_federated_downvotes) {
#[tracing::instrument(skip_all)]
async fn receive(self, context: &Data<LemmyContext>) -> Result<(), LemmyError> {
#[tracing::instrument(skip_all)]
async fn receive(self, context: &Data<LemmyContext>) -> Result<(), LemmyError> {
let actor = self.actor.dereference(context).await?;
let object = self.object.dereference(context).await?;
match object {
let actor = self.actor.dereference(context).await?;
let object = self.object.dereference(context).await?;
match object {