Skip to content

Commit

Permalink
[bugfix] fix check for closed poll to account for non-zero closed tim…
Browse files Browse the repository at this point in the history
…e but in the future (#2486)
  • Loading branch information
NyaaaWhatsUpDoc authored and tsmethurst committed Jan 10, 2024
1 parent b141500 commit f33d05c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/processing/polls/vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (p *Processor) PollVote(ctx context.Context, requester *gtsmodel.Account, p
return nil, gtserror.NewErrorUnprocessableEntity(errors.New(text), text)

// Poll has already closed, no more voting!
case !poll.ClosedAt.IsZero():
case poll.Closed():
const text = "poll already closed"
return nil, gtserror.NewErrorUnprocessableEntity(errors.New(text), text)

Expand Down

0 comments on commit f33d05c

Please sign in to comment.