[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>
Этот коммит содержится в:
Vishal
2023-05-05 12:09:00 +05:30
коммит произвёл GitHub
родитель 9f11fc59b5
Коммит d860548a76
23 изменённых файлов: 299 добавлений и 14 удалений

Просмотреть файл

@@ -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 {