Merge branch 'master' of github.com:mattermost/mattermost-server into MM-47853-true-up-review-telemetry-off-non-air-gapped

Этот коммит содержится в:
Conor Macpherson
2023-01-03 13:54:38 -05:00
родитель e31a6a47b0 c8e70718c2
Коммит 40724ae44d
23 изменённых файлов: 111 добавлений и 131 удалений

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

@@ -16,9 +16,6 @@ type FeatureFlags struct {
// all other values as false.
TestBoolFeature bool
// Toggle on and off support for Collapsed Threads
CollapsedThreads bool
// Enable the remote cluster service for shared channels.
EnableRemoteClusterService bool
@@ -81,7 +78,6 @@ type FeatureFlags struct {
func (f *FeatureFlags) SetDefaults() {
f.TestFeature = "off"
f.TestBoolFeature = false
f.CollapsedThreads = true
f.EnableRemoteClusterService = false
f.AppsEnabled = true
f.PluginApps = ""

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

@@ -10,6 +10,8 @@ type BootstrapSelfHostedSignupRequest struct {
type BootstrapSelfHostedSignupResponse struct {
Progress string `json:"progress"`
// email listed on the JWT claim
Email string `json:"email"`
}
type BootstrapSelfHostedSignupResponseInternal struct {

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

@@ -256,11 +256,15 @@ func (er *AppError) Error() string {
// render the error information
sb.WriteString(er.Where)
sb.WriteString(": ")
sb.WriteString(er.Message)
if er.Message != NoTranslation {
sb.WriteString(er.Message)
}
// only render the detailed error when it's present
if er.DetailedError != "" {
sb.WriteString(", ")
if er.Message != NoTranslation {
sb.WriteString(", ")
}
sb.WriteString(er.DetailedError)
}

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

@@ -81,6 +81,11 @@ func TestAppError(t *testing.T) {
t.Log(appErr.Error())
}
func TestAppErrorNoTranslation(t *testing.T) {
appErr := NewAppError("TestAppError", NoTranslation, nil, "test error", http.StatusBadRequest)
require.Equal(t, "TestAppError: test error", appErr.Error())
}
func TestAppErrorJunk(t *testing.T) {
rerr := AppErrorFromJSON(strings.NewReader("<html><body>This is a broken test</body></html>"))
require.Equal(t, "body: <html><body>This is a broken test</body></html>", rerr.DetailedError)