summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/platform/model/session.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-08-15 18:47:31 +0200
committerWim <wim@42.be>2016-08-15 18:47:31 +0200
commit24defcb970838133eb82f4fbbc516630fb81cae6 (patch)
treede88bd0761b08ee35d8f2ddbcb133f7899b4264d /vendor/github.com/mattermost/platform/model/session.go
parenta1a11a88b334a4deb78915336def0113eec9738b (diff)
downloadmatterbridge-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.go6
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) {