diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-05-03 11:54:49 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-05-03 08:54:49 -0700 |
commit | 08a3cf6b38fd8fdac3b5f7176133bc1a248bc8fc (patch) | |
tree | 66687c84dbda048f09954d6b7286f0a78fe5cd45 /model | |
parent | ffb4cb5e1051c3db13a8e3b1b2a9fd6fb8ed701c (diff) | |
download | chat-08a3cf6b38fd8fdac3b5f7176133bc1a248bc8fc.tar.gz chat-08a3cf6b38fd8fdac3b5f7176133bc1a248bc8fc.tar.bz2 chat-08a3cf6b38fd8fdac3b5f7176133bc1a248bc8fc.zip |
Port HPNS from 2.2 to master (#2863)
Diffstat (limited to 'model')
-rw-r--r-- | model/license.go | 34 | ||||
-rw-r--r-- | model/push_notification.go | 2 |
2 files changed, 25 insertions, 11 deletions
diff --git a/model/license.go b/model/license.go index 0cea67c3d..bc72ff9ad 100644 --- a/model/license.go +++ b/model/license.go @@ -32,15 +32,22 @@ type Customer struct { } type Features struct { - Users *int `json:"users"` - LDAP *bool `json:"ldap"` - MFA *bool `json:"mfa"` - GoogleSSO *bool `json:"google_sso"` - Compliance *bool `json:"compliance"` - CustomBrand *bool `json:"custom_brand"` + Users *int `json:"users"` + LDAP *bool `json:"ldap"` + MFA *bool `json:"mfa"` + GoogleSSO *bool `json:"google_sso"` + Compliance *bool `json:"compliance"` + CustomBrand *bool `json:"custom_brand"` + MHPNS *bool `json:"mhpns"` + FutureFeatures *bool `json:"future_features"` } func (f *Features) SetDefaults() { + if f.FutureFeatures == nil { + f.FutureFeatures = new(bool) + *f.FutureFeatures = true + } + if f.Users == nil { f.Users = new(int) *f.Users = 0 @@ -48,27 +55,32 @@ func (f *Features) SetDefaults() { if f.LDAP == nil { f.LDAP = new(bool) - *f.LDAP = true + *f.LDAP = *f.FutureFeatures } if f.MFA == nil { f.MFA = new(bool) - *f.MFA = true + *f.MFA = *f.FutureFeatures } if f.GoogleSSO == nil { f.GoogleSSO = new(bool) - *f.GoogleSSO = true + *f.GoogleSSO = *f.FutureFeatures } if f.Compliance == nil { f.Compliance = new(bool) - *f.Compliance = true + *f.Compliance = *f.FutureFeatures } if f.CustomBrand == nil { f.CustomBrand = new(bool) - *f.CustomBrand = true + *f.CustomBrand = *f.FutureFeatures + } + + if f.MHPNS == nil { + f.MHPNS = new(bool) + *f.MHPNS = *f.FutureFeatures } } diff --git a/model/push_notification.go b/model/push_notification.go index 9196a44dd..666dd8f7d 100644 --- a/model/push_notification.go +++ b/model/push_notification.go @@ -13,6 +13,8 @@ const ( PUSH_NOTIFY_ANDROID = "android" CATEGORY_DM = "DIRECT_MESSAGE" + + MHPNS = "https://push.mattermost.com" ) type PushNotification struct { |