diff options
author | Wim <wim@42.be> | 2016-08-15 18:47:31 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2016-08-15 18:47:31 +0200 |
commit | 24defcb970838133eb82f4fbbc516630fb81cae6 (patch) | |
tree | de88bd0761b08ee35d8f2ddbcb133f7899b4264d /vendor/github.com/mattermost/platform/model/session.go | |
parent | a1a11a88b334a4deb78915336def0113eec9738b (diff) | |
download | matterbridge-msglm-24defcb970838133eb82f4fbbc516630fb81cae6.tar.gz matterbridge-msglm-24defcb970838133eb82f4fbbc516630fb81cae6.tar.bz2 matterbridge-msglm-24defcb970838133eb82f4fbbc516630fb81cae6.zip |
Sync with mattermost 3.3.0
Diffstat (limited to 'vendor/github.com/mattermost/platform/model/session.go')
-rw-r--r-- | vendor/github.com/mattermost/platform/model/session.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/github.com/mattermost/platform/model/session.go b/vendor/github.com/mattermost/platform/model/session.go index 8a5eec74..ef51374d 100644 --- a/vendor/github.com/mattermost/platform/model/session.go +++ b/vendor/github.com/mattermost/platform/model/session.go @@ -83,7 +83,11 @@ func (me *Session) IsExpired() bool { } func (me *Session) SetExpireInDays(days int) { - me.ExpiresAt = GetMillis() + (1000 * 60 * 60 * 24 * int64(days)) + if me.CreateAt == 0 { + me.ExpiresAt = GetMillis() + (1000 * 60 * 60 * 24 * int64(days)) + } else { + me.ExpiresAt = me.CreateAt + (1000 * 60 * 60 * 24 * int64(days)) + } } func (me *Session) AddProp(key string, value string) { |