summary refs log tree commit diff
diff options
context:
space:
mode:
authorkim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-01-03 17:42:58 +0000
committertobi <tobi.smethurst@protonmail.com>2024-01-10 13:53:48 +0100
commitf33d05c3697d6d693452e76d0a71ba130e7ea13b (patch)
treea72059d649a1d9e32949eba7a5ee68e61df5543f
parentb141500e54ddbdb975ad2831842ff3e8fae997df (diff)
[bugfix] fix check for closed poll to account for non-zero closed time but in the future (#2486)
-rw-r--r--internal/processing/polls/vote.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/processing/polls/vote.go b/internal/processing/polls/vote.go
index c4a8a12a..5bc52397 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)