MM-30338 Add feature flag for collapsedthreads (#16598)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Eli Yukelzon
2021-01-13 12:42:35 +02:00
коммит произвёл GitHub
родитель aa64bde1e1
Коммит 110ac3b1ec
3 изменённых файлов: 12 добавлений и 2 удалений

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

@@ -420,7 +420,7 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
a.Publish(message)
// If this is a reply in a thread, notify participants
if *a.Config().ServiceSettings.CollapsedThreads != model.COLLAPSED_THREADS_DISABLED && post.RootId != "" {
if a.Config().FeatureFlags.CollapsedThreads && *a.Config().ServiceSettings.CollapsedThreads != model.COLLAPSED_THREADS_DISABLED && post.RootId != "" {
thread, err := a.Srv().Store.Thread().Get(post.RootId)
if err != nil {
return nil, errors.Wrapf(err, "cannot get thread %q", post.RootId)