mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-27 20:29:24 +00:00
Update mattermost vendor (3.7 => 4.1)
This commit is contained in:
14
vendor/github.com/mattermost/platform/model/search_params.go
generated
vendored
14
vendor/github.com/mattermost/platform/model/search_params.go
generated
vendored
@ -1,9 +1,10 @@
|
||||
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
package model
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
@ -19,6 +20,15 @@ type SearchParams struct {
|
||||
OrTerms bool
|
||||
}
|
||||
|
||||
func (o *SearchParams) ToJson() string {
|
||||
b, err := json.Marshal(o)
|
||||
if err != nil {
|
||||
return ""
|
||||
} else {
|
||||
return string(b)
|
||||
}
|
||||
}
|
||||
|
||||
var searchFlags = [...]string{"from", "channel", "in"}
|
||||
|
||||
func splitWordsNoQuotes(text string) []string {
|
||||
@ -165,7 +175,7 @@ func ParseSearchParams(text string) []*SearchParams {
|
||||
if len(plainTerms) == 0 && len(hashtagTerms) == 0 && (len(inChannels) != 0 || len(fromUsers) != 0) {
|
||||
paramsList = append(paramsList, &SearchParams{
|
||||
Terms: "",
|
||||
IsHashtag: true,
|
||||
IsHashtag: false,
|
||||
InChannels: inChannels,
|
||||
FromUsers: fromUsers,
|
||||
})
|
||||
|
Reference in New Issue
Block a user