[MM-37933] Channel preference to auto-follow all threads in the channel (#21430)
* Add auto-follow feature --------- Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -41,8 +41,26 @@ const (
|
||||
var ErrMaxPropSizeExceeded = fmt.Errorf("max prop size of %d exceeded", maxPropSizeBytes)
|
||||
|
||||
type StringInterface map[string]any
|
||||
type StringSet map[string]struct{}
|
||||
type StringArray []string
|
||||
|
||||
func (ss StringSet) Has(val string) bool {
|
||||
_, ok := ss[val]
|
||||
return ok
|
||||
}
|
||||
|
||||
func (ss StringSet) Add(val string) {
|
||||
ss[val] = struct{}{}
|
||||
}
|
||||
|
||||
func (ss StringSet) Val() []string {
|
||||
keys := make([]string, 0, len(ss))
|
||||
for k := range ss {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
return keys
|
||||
}
|
||||
|
||||
func (sa StringArray) Remove(input string) StringArray {
|
||||
for index := range sa {
|
||||
if sa[index] == input {
|
||||
|
||||
Ссылка в новой задаче
Block a user