Mm 52993 - expose enable user statuses to client (#25455)
* MM-52993_expose enable user statuses to client and prevent statuses fetch when disabled * modify the logic, add selector, add unit tests * implement PR feedback * fix unit tests * remove client console warnings * remove another unnecessary call if the flag is disabled * fix merge conflicts
Этот коммит содержится в:
@@ -284,6 +284,7 @@ func GenerateLimitedClientConfig(c *model.Config, telemetryID string, license *m
|
||||
props["DefaultClientLocale"] = *c.LocalizationSettings.DefaultClientLocale
|
||||
|
||||
props["EnableCustomEmoji"] = strconv.FormatBool(*c.ServiceSettings.EnableCustomEmoji)
|
||||
props["EnableUserStatuses"] = strconv.FormatBool(*c.ServiceSettings.EnableUserStatuses)
|
||||
props["AppDownloadLink"] = *c.NativeAppSettings.AppDownloadLink
|
||||
props["AndroidAppDownloadLink"] = *c.NativeAppSettings.AndroidAppDownloadLink
|
||||
props["IosAppDownloadLink"] = *c.NativeAppSettings.IosAppDownloadLink
|
||||
|
||||
@@ -240,6 +240,19 @@ func TestGetClientConfig(t *testing.T) {
|
||||
"ExperimentalSharedChannels": "true",
|
||||
},
|
||||
},
|
||||
{
|
||||
"disable EnableUserStatuses",
|
||||
&model.Config{
|
||||
ServiceSettings: model.ServiceSettings{
|
||||
EnableUserStatuses: model.NewBool(false),
|
||||
},
|
||||
},
|
||||
"",
|
||||
nil,
|
||||
map[string]string{
|
||||
"EnableUserStatuses": "false",
|
||||
},
|
||||
},
|
||||
{
|
||||
"Shared channels enterprise license",
|
||||
&model.Config{
|
||||
|
||||
Ссылка в новой задаче
Block a user