diff options
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) { |