WPD: remove poll limit (#51)
by request of the wpd mops Co-authored-by: justcool393 <justcool393@gmail.com> Reviewed-on: #51 Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net> Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>pull/54/head
parent
6c491b9d11
commit
c12bf5105f
|
@ -619,6 +619,8 @@ elif SITE == 'watchpeopledie.tv':
|
|||
PERMS['POST_EDITING'] = 2
|
||||
PERMS['ADMIN_ADD'] = 4
|
||||
|
||||
POLL_MAX_OPTIONS = 0
|
||||
|
||||
ERROR_TITLES.update({
|
||||
400: "Bad Request",
|
||||
401: "Unauthorized",
|
||||
|
|
|
@ -499,7 +499,7 @@ def validate_css(css):
|
|||
def sanitize_poll_options(v:User, body:str, allow_bets:bool) -> tuple[str, List[Any], List[Any], List[Any]]:
|
||||
def sanitize_poll_type(body:str, re:re.Pattern) -> tuple[str, List[str]]:
|
||||
opts = []
|
||||
for i in list(re.finditer(body))[:POLL_MAX_OPTIONS]:
|
||||
for i in list(re.finditer(body))[:POLL_MAX_OPTIONS] if POLL_MAX_OPTIONS else list(re.finditer(body)):
|
||||
opts.append(filter_emojis_only(i.group(1)))
|
||||
body = body.replace(i.group(0), "")
|
||||
return (body, opts)
|
||||
|
|
Loading…
Reference in New Issue