MM-19551: Add IsDefaultMarketplace to client config (#13183)
This exposes the necessary data to the webapp to know when to send more detailed telemetry events.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0907530528
Коммит
98bc2b1077
@@ -132,6 +132,7 @@ func GenerateClientConfig(c *model.Config, diagnosticId string, license *model.L
|
||||
props["PasswordRequireNumber"] = strconv.FormatBool(*c.PasswordSettings.Number)
|
||||
props["PasswordRequireSymbol"] = strconv.FormatBool(*c.PasswordSettings.Symbol)
|
||||
props["CustomUrlSchemes"] = strings.Join(c.DisplaySettings.CustomUrlSchemes, ",")
|
||||
props["IsDefaultMarketplace"] = strconv.FormatBool(*c.PluginSettings.MarketplaceUrl == model.PLUGIN_SETTINGS_DEFAULT_MARKETPLACE_URL)
|
||||
|
||||
if license != nil {
|
||||
props["ExperimentalHideTownSquareinLHS"] = strconv.FormatBool(*c.TeamSettings.ExperimentalHideTownSquareinLHS)
|
||||
|
||||
@@ -139,6 +139,32 @@ func TestGetClientConfig(t *testing.T) {
|
||||
"ExperimentalChannelOrganization": "true",
|
||||
},
|
||||
},
|
||||
{
|
||||
"default marketplace",
|
||||
&model.Config{
|
||||
PluginSettings: model.PluginSettings{
|
||||
MarketplaceUrl: sToP(model.PLUGIN_SETTINGS_DEFAULT_MARKETPLACE_URL),
|
||||
},
|
||||
},
|
||||
"tag1",
|
||||
nil,
|
||||
map[string]string{
|
||||
"IsDefaultMarketplace": "true",
|
||||
},
|
||||
},
|
||||
{
|
||||
"non-default marketplace",
|
||||
&model.Config{
|
||||
PluginSettings: model.PluginSettings{
|
||||
MarketplaceUrl: sToP("http://example.com"),
|
||||
},
|
||||
},
|
||||
"tag1",
|
||||
nil,
|
||||
map[string]string{
|
||||
"IsDefaultMarketplace": "false",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, testCase := range testCases {
|
||||
|
||||
Ссылка в новой задаче
Block a user