spelling (#19956)
* spelling: activated Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: attachments Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: categories Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: category Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: cellspacing Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: channel Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: compliance Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: constraint Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: counts Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: createat Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: deactivate Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: destination Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: exceeded Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: failed Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: foreign Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: hours Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: inactivity Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: inappropriate Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: initialization Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: initialized Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: management Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: mismatch Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: recipients Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: scheme Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: signature Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: subscription Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: suggestions Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: sync Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: telemetry Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: webhook Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * Trigger CI ```release-note NONE ``` Co-authored-by: Josh Soref <jsoref@users.noreply.github.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d1de4857aa
Коммит
16b1cbd6e3
@@ -242,7 +242,7 @@ func (a *App) TestEmail(userID string, cfg *model.Config) *model.AppError {
|
||||
func (s *Server) serverBusyStateChanged(sbs *model.ServerBusyState) {
|
||||
s.Busy.ClusterEventChanged(sbs)
|
||||
if sbs.Busy {
|
||||
mlog.Warn("server busy state activitated via cluster event - non-critical services disabled", mlog.Int64("expires_sec", sbs.Expires))
|
||||
mlog.Warn("server busy state activated via cluster event - non-critical services disabled", mlog.Int64("expires_sec", sbs.Expires))
|
||||
} else {
|
||||
mlog.Info("server busy state cleared via cluster event - non-critical services enabled")
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ func (a *App) GetComplianceReport(reportId string) (*model.Compliance, *model.Ap
|
||||
var nfErr *store.ErrNotFound
|
||||
switch {
|
||||
case errors.As(err, &nfErr):
|
||||
return nil, model.NewAppError("GetComplicanceReport", "app.compliance.get.finding.app_error", nil, nfErr.Error(), http.StatusNotFound)
|
||||
return nil, model.NewAppError("GetComplianceReport", "app.compliance.get.finding.app_error", nil, nfErr.Error(), http.StatusNotFound)
|
||||
default:
|
||||
return nil, model.NewAppError("GetComplianceReport", "app.compliance.get.finding.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ func (s *Server) setupFeatureFlags() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Server) updateFeatureFlagValuesFromManagment() {
|
||||
func (s *Server) updateFeatureFlagValuesFromManagement() {
|
||||
newCfg := s.configStore.GetNoEnv().Clone()
|
||||
oldFlags := *newCfg.FeatureFlags
|
||||
newFlags := s.featureFlagSynchronizer.UpdateFeatureFlagValues(oldFlags)
|
||||
@@ -94,13 +94,13 @@ func (s *Server) startFeatureFlagUpdateJob() error {
|
||||
s.Log.Warn("Problem connecting to feature flag management. Will fallback to cloud cache.", mlog.Err(err))
|
||||
return
|
||||
}
|
||||
s.updateFeatureFlagValuesFromManagment()
|
||||
s.updateFeatureFlagValuesFromManagement()
|
||||
for {
|
||||
select {
|
||||
case <-s.featureFlagStop:
|
||||
return
|
||||
case <-ticker.C:
|
||||
s.updateFeatureFlagValuesFromManagment()
|
||||
s.updateFeatureFlagValuesFromManagement()
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -832,13 +832,13 @@ func (a *App) importUserTeams(user *model.User, data *[]UserTeamImportData) *mod
|
||||
if nErr != nil {
|
||||
var appErr *model.AppError
|
||||
var conflictErr *store.ErrConflict
|
||||
var limitExeededErr *store.ErrLimitExceeded
|
||||
var limitExceededErr *store.ErrLimitExceeded
|
||||
switch {
|
||||
case errors.As(nErr, &appErr): // in case we haven't converted to plain error.
|
||||
return appErr
|
||||
case errors.As(nErr, &conflictErr):
|
||||
return model.NewAppError("BulkImport", "app.import.import_user_teams.save_members.conflict.app_error", nil, nErr.Error(), http.StatusBadRequest)
|
||||
case errors.As(nErr, &limitExeededErr):
|
||||
case errors.As(nErr, &limitExceededErr):
|
||||
return model.NewAppError("BulkImport", "app.import.import_user_teams.save_members.max_accounts.app_error", nil, nErr.Error(), http.StatusBadRequest)
|
||||
default: // last fallback in case it doesn't map to an existing app error.
|
||||
return model.NewAppError("BulkImport", "app.import.import_user_teams.save_members.error", nil, nErr.Error(), http.StatusInternalServerError)
|
||||
|
||||
@@ -509,13 +509,13 @@ func (a *App) doLocalWarnMetricsRequest(c *request.Context, rawURL string, upstr
|
||||
},
|
||||
},
|
||||
)
|
||||
attachements := []*model.SlackAttachment{{
|
||||
attachments := []*model.SlackAttachment{{
|
||||
AuthorName: "",
|
||||
Title: "",
|
||||
Actions: actions,
|
||||
Text: i18n.T("api.server.warn_metric.bot_response.notification_failure.body"),
|
||||
}}
|
||||
model.ParseSlackAttachment(botPost, attachements)
|
||||
model.ParseSlackAttachment(botPost, attachments)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -338,10 +338,10 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
||||
}
|
||||
|
||||
if *a.Config().EmailSettings.SendEmailNotifications {
|
||||
emailReceipients := append(mentionedUsersList, notificationsForCRT.Email...)
|
||||
emailReceipients = model.RemoveDuplicateStrings(emailReceipients)
|
||||
emailRecipients := append(mentionedUsersList, notificationsForCRT.Email...)
|
||||
emailRecipients = model.RemoveDuplicateStrings(emailRecipients)
|
||||
|
||||
for _, id := range emailReceipients {
|
||||
for _, id := range emailRecipients {
|
||||
if profileMap[id] == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ func SetLogger(logger *mlog.Logger) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func SkipPostInitializiation() Option {
|
||||
func SkipPostInitialization() Option {
|
||||
return func(s *Server) error {
|
||||
s.skipPostInit = true
|
||||
|
||||
|
||||
@@ -98,12 +98,12 @@ func (ch *Channels) verifyPlugin(plugin, signature io.ReadSeeker) *model.AppErro
|
||||
return model.NewAppError("VerifyPlugin", "api.plugin.verify_plugin.app_error", nil, "", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
func verifySignature(publicKey, message, signatrue io.Reader) error {
|
||||
func verifySignature(publicKey, message, signature io.Reader) error {
|
||||
pk, err := decodeIfArmored(publicKey)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "can't decode public key")
|
||||
}
|
||||
s, err := decodeIfArmored(signatrue)
|
||||
s, err := decodeIfArmored(signature)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "can't decode signature")
|
||||
}
|
||||
|
||||
@@ -630,7 +630,7 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
go func() {
|
||||
appInstance := New(ServerConnector(s.Channels()))
|
||||
if err := appInstance.UpdateProductNotices(); err != nil {
|
||||
mlog.Warn("Failied to perform initial product notices fetch", mlog.Err(err))
|
||||
mlog.Warn("Failed to perform initial product notices fetch", mlog.Err(err))
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ func (s *Server) doInactivityCheck() {
|
||||
return
|
||||
}
|
||||
|
||||
inactivityDurationHourseEnv := os.Getenv("MM_INACTIVITY_DURATION")
|
||||
inactivityDurationHours, parseError := strconv.ParseFloat(inactivityDurationHourseEnv, 64)
|
||||
inactivityDurationHoursEnv := os.Getenv("MM_INACTIVITY_DURATION")
|
||||
inactivityDurationHours, parseError := strconv.ParseFloat(inactivityDurationHoursEnv, 64)
|
||||
if parseError != nil {
|
||||
// default to 100 hours
|
||||
inactivityDurationHours = serverInactivityHours
|
||||
@@ -50,14 +50,14 @@ func (s *Server) doInactivityCheck() {
|
||||
if systemValue != nil {
|
||||
sysT, _ := strconv.ParseInt(systemValue.Value, 10, 64)
|
||||
tt := time.Unix(sysT/1000, 0)
|
||||
timeLastSentInativityEmail := time.Since(tt).Hours()
|
||||
timeLastSentInactivityEmail := time.Since(tt).Hours()
|
||||
|
||||
lastPostAt, _ := s.Store.Post().GetLastPostRowCreateAt()
|
||||
if lastPostAt != 0 {
|
||||
posT := time.Unix(lastPostAt/1000, 0)
|
||||
timeForLastPost := time.Since(posT).Hours()
|
||||
|
||||
if timeLastSentInativityEmail > inactivityDurationHours && timeForLastPost > inactivityDurationHours {
|
||||
if timeLastSentInactivityEmail > inactivityDurationHours && timeForLastPost > inactivityDurationHours {
|
||||
s.takeInactivityAction()
|
||||
}
|
||||
return
|
||||
@@ -68,7 +68,7 @@ func (s *Server) doInactivityCheck() {
|
||||
sesT := time.Unix(lastSessionAt/1000, 0)
|
||||
timeForLastSession := time.Since(sesT).Hours()
|
||||
|
||||
if timeLastSentInativityEmail > inactivityDurationHours && timeForLastSession > inactivityDurationHours {
|
||||
if timeLastSentInactivityEmail > inactivityDurationHours && timeForLastSession > inactivityDurationHours {
|
||||
s.takeInactivityAction()
|
||||
}
|
||||
return
|
||||
|
||||
@@ -650,7 +650,7 @@ func (a *App) JoinUserToTeam(c *request.Context, team *model.Team, user *model.U
|
||||
if err != nil {
|
||||
var appErr *model.AppError
|
||||
var conflictErr *store.ErrConflict
|
||||
var limitExeededErr *store.ErrLimitExceeded
|
||||
var limitExceededErr *store.ErrLimitExceeded
|
||||
switch {
|
||||
case errors.Is(err, teams.AcceptedDomainError):
|
||||
return nil, model.NewAppError("JoinUserToTeam", "api.team.join_user_to_team.allowed_domains.app_error", nil, "", http.StatusBadRequest)
|
||||
@@ -662,7 +662,7 @@ func (a *App) JoinUserToTeam(c *request.Context, team *model.Team, user *model.U
|
||||
return nil, appErr
|
||||
case errors.As(err, &conflictErr):
|
||||
return nil, model.NewAppError("JoinUserToTeam", "app.team.join_user_to_team.save_member.conflict.app_error", nil, err.Error(), http.StatusBadRequest)
|
||||
case errors.As(err, &limitExeededErr):
|
||||
case errors.As(err, &limitExceededErr):
|
||||
return nil, model.NewAppError("JoinUserToTeam", "app.team.join_user_to_team.save_member.max_accounts.app_error", nil, err.Error(), http.StatusBadRequest)
|
||||
default: // last fallback in case it doesn't map to an existing app error.
|
||||
return nil, model.NewAppError("JoinUserToTeam", "app.team.join_user_to_team.save_member.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
|
||||
Ссылка в новой задаче
Block a user