This commit is contained in:
Kitaiti Makoto 2023-01-05 02:23:50 +09:00
parent f138ae6ed9
commit 85cacf4239
2 changed files with 5 additions and 2 deletions

View File

@ -9,7 +9,7 @@ use crate::{
use chrono::NaiveDateTime;
use diesel::{self, result::Error::NotFound, ExpressionMethods, QueryDsl, RunQueryDsl};
use once_cell::sync::OnceCell;
use plume_common::utils::{md_to_html, iri_percent_encode_seg};
use plume_common::utils::{iri_percent_encode_seg, md_to_html};
use std::sync::RwLock;
#[derive(Clone, Identifiable, Queryable)]

View File

@ -45,7 +45,10 @@ impl Actor for RemoteFetchActor {
RemoteUserFound(user) => match self.conn.get() {
Ok(conn) => {
let conn = DbConn(conn);
if user.get_instance(&conn).map_or(false, |instance| instance.blocked) {
if user
.get_instance(&conn)
.map_or(false, |instance| instance.blocked)
{
return;
}
// Don't call these functions in parallel