diff options
author | r <r@freesoftwareextremist.com> | 2020-02-19 16:33:21 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2020-02-19 16:33:21 +0000 |
commit | dd23ac48678c704949074dd0e41bb8a3550cc33f (patch) | |
tree | 923248c707bcf17db9a7b921195933c3c828935c /mastodon | |
parent | fe31d4197b66cced9ca84779fac4fe69242d844b (diff) | |
download | bloat-dd23ac48678c704949074dd0e41bb8a3550cc33f.tar.gz bloat-dd23ac48678c704949074dd0e41bb8a3550cc33f.zip |
Fix time duration value
- Make sure that duration is not < 0
- Handle nil ExpiresAt time in poll
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/poll.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mastodon/poll.go b/mastodon/poll.go index 274b95e..cd874a7 100644 --- a/mastodon/poll.go +++ b/mastodon/poll.go @@ -10,7 +10,7 @@ import ( type Poll struct { ID string `json:"id"` - ExpiresAt time.Time `json:"expires_at"` + ExpiresAt *time.Time `json:"expires_at"` Expired bool `json:"expired"` Multiple bool `json:"multiple"` VotesCount int64 `json:"votes_count"` |