From 511ad97fe766051081a27152c22881aa43fb147c Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Wed, 3 Jan 2024 17:42:58 +0000 Subject: [PATCH] [bugfix] fix check for closed poll to account for non-zero closed time but in the future (#2486) --- internal/processing/polls/vote.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/processing/polls/vote.go b/internal/processing/polls/vote.go index c4a8a12a4..5bc523978 100644 --- a/internal/processing/polls/vote.go +++ b/internal/processing/polls/vote.go @@ -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)