[MM-41351] Set ThreadAutoFollow to false by default (#19441)

Summary
ThreadAutoFollow is now false by default. Won't affect existing systems that have it set to true.

Ticket Link
https://mattermost.atlassian.net/browse/MM-41351
Этот коммит содержится в:
Ashish Bhate
2022-02-01 16:21:04 +05:30
коммит произвёл GitHub
родитель cc47648b4d
Коммит ae16f51aea
3 изменённых файлов: 10 добавлений и 1 удалений

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

@@ -5947,6 +5947,11 @@ func TestFollowThreads(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
th.App.UpdateConfig(func(cfg *model.Config) {
*cfg.ServiceSettings.ThreadAutoFollow = true
*cfg.ServiceSettings.CollapsedThreads = model.CollapsedThreadsDefaultOn
})
t.Run("1 thread", func(t *testing.T) {
client := th.Client

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

@@ -2100,6 +2100,10 @@ func TestThreadMembership(t *testing.T) {
t.Run("should update memberships for conversation participants", func(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
th.App.UpdateConfig(func(cfg *model.Config) {
*cfg.ServiceSettings.ThreadAutoFollow = true
*cfg.ServiceSettings.CollapsedThreads = model.CollapsedThreadsDefaultOn
})
user1 := th.BasicUser
user2 := th.BasicUser2

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

@@ -772,7 +772,7 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
}
if s.ThreadAutoFollow == nil {
s.ThreadAutoFollow = NewBool(true)
s.ThreadAutoFollow = NewBool(false)
}
if s.CollapsedThreads == nil {