Don't retrieve user info from blocked instances
This commit is contained in:
parent
8c098def61
commit
2804a490ed
@ -45,6 +45,9 @@ impl Actor for RemoteFetchActor {
|
|||||||
RemoteUserFound(user) => match self.conn.get() {
|
RemoteUserFound(user) => match self.conn.get() {
|
||||||
Ok(conn) => {
|
Ok(conn) => {
|
||||||
let conn = DbConn(conn);
|
let conn = DbConn(conn);
|
||||||
|
if user.get_instance(&conn).map_or(false, |instance| instance.blocked) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Don't call these functions in parallel
|
// Don't call these functions in parallel
|
||||||
// for the case database connections limit is too small
|
// for the case database connections limit is too small
|
||||||
fetch_and_cache_articles(&user, &conn);
|
fetch_and_cache_articles(&user, &conn);
|
||||||
|
Loading…
Reference in New Issue
Block a user