diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-08-10 11:57:01 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-08-10 11:57:01 +0200 |
| commit | 94d3308eec4288d3ec1bb6f97c226e9f51785ca1 (patch) | |
| tree | 793255eaa7000e6caec51d875ed50f318f41dc88 /internal/server | |
| parent | 557cb4aa3ecb48800957c0f9f68571a11746d9fb (diff) | |
Server: Always show renew button when session is expired
This is useful for servers which have a custom expiry < 30 minutes
Diffstat (limited to 'internal/server')
| -rw-r--r-- | internal/server/common.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/server/common.go b/internal/server/common.go index 90744e8..6257a4d 100644 --- a/internal/server/common.go +++ b/internal/server/common.go @@ -290,6 +290,11 @@ func ShouldRenewButton(server Server) bool { // Get current time current := util.GetCurrentTime() + // Session is expired + if current.After(base.EndTime) { + return true + } + // 30 minutes have not passed if !current.After(base.StartTime.Add(30 * time.Minute)) { return false |
