[MM-32692] Add two more CRT options (#20088)

* MM-32692 Add two more CRT options deafult_on and always_on

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Vishal
2022-05-12 12:03:59 +05:30
коммит произвёл GitHub
родитель ea98f9f4a9
Коммит 1092c60bc6
5 изменённых файлов: 104 добавлений и 5 удалений

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

@@ -241,9 +241,10 @@ func (es *Service) sendBatchedEmailNotification(userID string, notifications []*
}
// check if user has CRT set to ON
threadsEnabled := false
if *es.config().ServiceSettings.CollapsedThreads != model.CollapsedThreadsDisabled {
threadsEnabled = *es.config().ServiceSettings.CollapsedThreads == model.CollapsedThreadsDefaultOn
appCRT := *es.config().ServiceSettings.CollapsedThreads
threadsEnabled := appCRT == model.CollapsedThreadsAlwaysOn
if !threadsEnabled && appCRT != model.CollapsedThreadsDisabled {
threadsEnabled = appCRT == model.CollapsedThreadsDefaultOn
// check if a participant has overridden collapsed threads settings
if preference, errCrt := es.store.Preference().Get(userID, model.PreferenceCategoryDisplaySettings, model.PreferenceNameCollapsedThreadsEnabled); errCrt == nil {
threadsEnabled = preference.Value == "on"