Refactored polls module to use browser sessions for creation and voting routes.
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (Python 3.12) (push) Successful in 2m47s
CI / Tests (Python 3.13) (push) Successful in 2m46s
CI / Tests (Python 3.14) (push) Successful in 2m44s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 6s
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (Python 3.12) (push) Successful in 2m47s
CI / Tests (Python 3.13) (push) Successful in 2m46s
CI / Tests (Python 3.14) (push) Successful in 2m44s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 6s
This commit is contained in:
@@ -114,8 +114,7 @@ async def on_user_joined(ctx: EventContext[UserJoinedEvent]) -> None:
|
||||
"""Notify a user joining chat that a poll is active.
|
||||
|
||||
Sends a private message with the poll question, options, and voting
|
||||
instructions. Also refreshes the user's token privileges in case their
|
||||
authentication or moderator status has changed.
|
||||
instructions.
|
||||
|
||||
:param ctx: The event context.
|
||||
"""
|
||||
@@ -124,13 +123,6 @@ async def on_user_joined(ctx: EventContext[UserJoinedEvent]) -> None:
|
||||
if poll is None:
|
||||
return
|
||||
|
||||
event = ctx.event
|
||||
manager.refresh_user_status(
|
||||
event.user.id,
|
||||
is_moderator=event.user.is_moderator,
|
||||
is_authenticated=event.user.is_authenticated,
|
||||
)
|
||||
|
||||
escaped_question = escape(poll.question)
|
||||
option_lines = "".join(
|
||||
f"<strong>{i}.</strong> {escape(opt)}<br>"
|
||||
|
||||
Reference in New Issue
Block a user