From deaea100c37698893e97cf9cab159a3d220ac3cd Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Sat, 11 Nov 2023 10:15:04 +0000 Subject: [bugfix] support endless polls, and misskey's' method of inferring expiry in closed polls (#2349) --- internal/gtsmodel/poll.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/gtsmodel/poll.go') diff --git a/internal/gtsmodel/poll.go b/internal/gtsmodel/poll.go index 7e131ebba..35a9ddf59 100644 --- a/internal/gtsmodel/poll.go +++ b/internal/gtsmodel/poll.go @@ -32,8 +32,8 @@ type Poll struct { Voters *int `bun:",nullzero,notnull"` // Total no. voters count. StatusID string `bun:"type:CHAR(26),nullzero,notnull,unique"` // Status ID of which this Poll is attached to. Status *Status `bun:"-"` // The related Status for StatusID (not always set). - ExpiresAt time.Time `bun:"type:timestamptz,nullzero,notnull"` // The expiry date of this Poll. - ClosedAt time.Time `bun:"type:timestamptz,nullzero"` // The closure date of this poll, will be zerotime until set. + ExpiresAt time.Time `bun:"type:timestamptz,nullzero"` // The expiry date of this Poll, will be zerotime until set. (local polls ALWAYS have this set). + ClosedAt time.Time `bun:"type:timestamptz,nullzero"` // The closure date of this poll, anything other than zerotime indicates closed. Closing bool `bun:"-"` // An ephemeral field only set on Polls in the middle of closing. // no creation date, use attached Status.CreatedAt. } -- cgit v1.2.3