mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Also prevent bot accounts from voting
This commit is contained in:
parent
4a25df2de7
commit
82a092eec8
1 changed files with 2 additions and 2 deletions
|
@ -442,7 +442,7 @@ def banned_ip_addresses() -> List[str]:
|
|||
|
||||
|
||||
def can_downvote(user, community: Community, site=None) -> bool:
|
||||
if user is None or community is None or user.banned:
|
||||
if user is None or community is None or user.banned or user.bot:
|
||||
return False
|
||||
|
||||
if site is None:
|
||||
|
@ -464,7 +464,7 @@ def can_downvote(user, community: Community, site=None) -> bool:
|
|||
|
||||
|
||||
def can_upvote(user, community: Community) -> bool:
|
||||
if user is None or community is None or user.banned:
|
||||
if user is None or community is None or user.banned or user.bot:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
Loading…
Add table
Reference in a new issue