Don't return error when processing activity from blocked instance

This commit is contained in:
silverpill 2022-06-14 19:46:46 +00:00
parent 29ace97b0e
commit 91309e1a7b
2 changed files with 5 additions and 1 deletions

View file

@ -23,6 +23,9 @@ registrations_open: false
#post_character_limit: 2000
# List of blocked domains
#blocked_instances: []
# Blockchain integration
#blockchain:
# chain_id: eip155:31337

View file

@ -170,7 +170,8 @@ pub async fn receive_activity(
let signer_id = signer.actor_id(&config.instance_url());
log::debug!("activity signed by {}", signer_id);
if config.blocked_instances.iter().any(|instance| signer.acct.contains(instance)) {
return Err(HttpError::ValidationError("instance is blocked".into()));
log::warn!("ignoring activity from blocked instance: {}", activity_raw);
return Ok(());
};
let maybe_object_type = match (activity_type.as_str(), maybe_object_type) {