mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-29 02:36:17 +00:00
Sync with mattermost 3.5.0
This commit is contained in:
6
vendor/github.com/mattermost/platform/model/session.go
generated
vendored
6
vendor/github.com/mattermost/platform/model/session.go
generated
vendored
@ -11,7 +11,7 @@ import (
|
||||
|
||||
const (
|
||||
SESSION_COOKIE_TOKEN = "MMAUTHTOKEN"
|
||||
SESSION_CACHE_SIZE = 10000
|
||||
SESSION_CACHE_SIZE = 25000
|
||||
SESSION_PROP_PLATFORM = "platform"
|
||||
SESSION_PROP_OS = "os"
|
||||
SESSION_PROP_BROWSER = "browser"
|
||||
@ -115,6 +115,10 @@ func (me *Session) IsMobileApp() bool {
|
||||
(strings.HasPrefix(me.DeviceId, PUSH_NOTIFY_APPLE+":") || strings.HasPrefix(me.DeviceId, PUSH_NOTIFY_ANDROID+":"))
|
||||
}
|
||||
|
||||
func (me *Session) GetUserRoles() []string {
|
||||
return strings.Fields(me.Roles)
|
||||
}
|
||||
|
||||
func SessionsToJson(o []*Session) string {
|
||||
if b, err := json.Marshal(o); err != nil {
|
||||
return "[]"
|
||||
|
Reference in New Issue
Block a user