summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/poll.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-11-11 10:15:04 +0000
committerLibravatar GitHub <noreply@github.com>2023-11-11 10:15:04 +0000
commitdeaea100c37698893e97cf9cab159a3d220ac3cd (patch)
treef48abc96964652d1701d91c88a00174c8f1b0196 /internal/gtsmodel/poll.go
parent[feature] Media attachment placeholders (#2331) (diff)
downloadgotosocial-deaea100c37698893e97cf9cab159a3d220ac3cd.tar.xz
[bugfix] support endless polls, and misskey's' method of inferring expiry in closed polls (#2349)
Diffstat (limited to 'internal/gtsmodel/poll.go')
-rw-r--r--internal/gtsmodel/poll.go4
1 files changed, 2 insertions, 2 deletions
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.
}