diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-03-20 16:41:50 +0100 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2023-09-25 09:43:37 +0200 |
| commit | fb294acb887e6715d92507ddb18b49e30df2f3c2 (patch) | |
| tree | d567d5cfc5ce3559a8775403e1633e3fa7aa5108 /client | |
| parent | 078e6b2e1c9a95c0a38e315c994bfcabed0c1784 (diff) | |
Client: Check if the base time is zero when getting expiry times
Diffstat (limited to 'client')
| -rw-r--r-- | client/client.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/client.go b/client/client.go index 31110bd..3d059df 100644 --- a/client/client.go +++ b/client/client.go @@ -296,6 +296,10 @@ func (c *Client) ExpiryTimes() (*srvtypes.Expiry, error) { return nil, err } + if b.StartTime.IsZero() { + return nil, errors.New("start time is zero, did you get a configuration?") + } + bT := b.RenewButtonTime() cT := b.CountdownTime() nT := b.NotificationTimes() |
