mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-29 02:36:17 +00:00
Update mattermost vendor (3.7 => 4.1)
This commit is contained in:
27
vendor/github.com/mattermost/platform/model/user_autocomplete.go
generated
vendored
27
vendor/github.com/mattermost/platform/model/user_autocomplete.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
package model
|
||||
@ -17,6 +17,31 @@ type UserAutocompleteInTeam struct {
|
||||
InTeam []*User `json:"in_team"`
|
||||
}
|
||||
|
||||
type UserAutocomplete struct {
|
||||
Users []*User `json:"users"`
|
||||
OutOfChannel []*User `json:"out_of_channel,omitempty"`
|
||||
}
|
||||
|
||||
func (o *UserAutocomplete) ToJson() string {
|
||||
b, err := json.Marshal(o)
|
||||
if err != nil {
|
||||
return ""
|
||||
} else {
|
||||
return string(b)
|
||||
}
|
||||
}
|
||||
|
||||
func UserAutocompleteFromJson(data io.Reader) *UserAutocomplete {
|
||||
decoder := json.NewDecoder(data)
|
||||
autocomplete := new(UserAutocomplete)
|
||||
err := decoder.Decode(&autocomplete)
|
||||
if err == nil {
|
||||
return autocomplete
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func (o *UserAutocompleteInChannel) ToJson() string {
|
||||
b, err := json.Marshal(o)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user