mirror of https://github.com/LemmyNet/lemmy.git
change error
parent
ae94f53900
commit
23384e133b
|
@ -840,7 +840,7 @@ pub async fn check_vote_permission(
|
||||||
if community.only_followers_can_vote
|
if community.only_followers_can_vote
|
||||||
&& !CommunityFollower::is_follower(&mut context.pool(), person.id, community.id).await?
|
&& !CommunityFollower::is_follower(&mut context.pool(), person.id, community.id).await?
|
||||||
{
|
{
|
||||||
Err(LemmyErrorType::DownvotesAreDisabled)?
|
Err(LemmyErrorType::OnlyFollowersCanVote)?
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,6 +113,7 @@ pub enum LemmyErrorType {
|
||||||
CommunityIsBlocked,
|
CommunityIsBlocked,
|
||||||
InstanceIsBlocked,
|
InstanceIsBlocked,
|
||||||
DownvotesAreDisabled,
|
DownvotesAreDisabled,
|
||||||
|
OnlyFollowersCanVote,
|
||||||
InstanceIsPrivate,
|
InstanceIsPrivate,
|
||||||
/// Password must be between 10 and 60 characters
|
/// Password must be between 10 and 60 characters
|
||||||
InvalidPassword,
|
InvalidPassword,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3c217c609aa8826fc725f708221c8b3eb825f41a
|
Subproject commit c3e61706e2ff7977db83e964e3010f72cad5e408
|
Loading…
Reference in New Issue