This commit is contained in:
@@ -904,12 +904,12 @@ impl SocialCommand for InMemorySocialRepository {
|
|||||||
actor_url: h.clone(),
|
actor_url: h.clone(),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
if let SocialIdentity::Local(target_id) = &identity {
|
if let SocialIdentity::Local(target_id) = &identity
|
||||||
if follower == target_id {
|
&& follower == target_id
|
||||||
return Err(DomainError::ValidationError(
|
{
|
||||||
"Cannot follow yourself".into(),
|
return Err(DomainError::ValidationError(
|
||||||
));
|
"Cannot follow yourself".into(),
|
||||||
}
|
));
|
||||||
}
|
}
|
||||||
let mut store = self.follows.lock().unwrap();
|
let mut store = self.follows.lock().unwrap();
|
||||||
let already = store
|
let already = store
|
||||||
|
|||||||
Reference in New Issue
Block a user