mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-27 15:49:23 +00:00
Sync with mattermost 3.4.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
@ -6,6 +6,7 @@ package model
|
||||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -109,6 +110,11 @@ func (me *Session) GetTeamByTeamId(teamId string) *TeamMember {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (me *Session) IsMobileApp() bool {
|
||||
return len(me.DeviceId) > 0 &&
|
||||
(strings.HasPrefix(me.DeviceId, PUSH_NOTIFY_APPLE+":") || strings.HasPrefix(me.DeviceId, PUSH_NOTIFY_ANDROID+":"))
|
||||
}
|
||||
|
||||
func SessionsToJson(o []*Session) string {
|
||||
if b, err := json.Marshal(o); err != nil {
|
||||
return "[]"
|
||||
|
Reference in New Issue
Block a user