[GH-19267] Spelling comments (#19268)
* spelling: comments Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> Co-authored-by: Josh Soref <jsoref@users.noreply.github.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
@@ -111,7 +111,7 @@ type AppIface interface {
|
||||
DeleteGroupConstrainedMemberships(c *request.Context) error
|
||||
// DeletePublicKey will delete plugin public key from the config.
|
||||
DeletePublicKey(name string) *model.AppError
|
||||
// DemoteUserToGuest Convert user's roles and all his mermbership's roles from
|
||||
// DemoteUserToGuest Convert user's roles and all his membership's roles from
|
||||
// regular user roles to guest roles.
|
||||
DemoteUserToGuest(user *model.User) *model.AppError
|
||||
// DisablePlugin will set the config for an installed plugin to disabled, triggering deactivation if active.
|
||||
@@ -253,7 +253,7 @@ type AppIface interface {
|
||||
// PopulateWebConnConfig checks if the connection id already exists in the hub,
|
||||
// and if so, accordingly populates the other fields of the webconn.
|
||||
PopulateWebConnConfig(s *model.Session, cfg *WebConnConfig, seqVal string) (*WebConnConfig, error)
|
||||
// PromoteGuestToUser Convert user's roles and all his mermbership's roles from
|
||||
// PromoteGuestToUser Convert user's roles and all his membership's roles from
|
||||
// guest roles to regular user roles.
|
||||
PromoteGuestToUser(c *request.Context, user *model.User, requestorId string) *model.AppError
|
||||
// RenameChannel is used to rename the channel Name and the DisplayName fields
|
||||
|
||||
@@ -565,7 +565,7 @@ func TestDisableUserBots(t *testing.T) {
|
||||
err = th.App.disableUserBots(th.Context, ownerId1)
|
||||
require.Nil(t, err)
|
||||
|
||||
// Check all bots and corrensponding users are disabled for creator 1
|
||||
// Check all bots and corresponding users are disabled for creator 1
|
||||
for _, bot := range bots {
|
||||
retbot, err2 := th.App.GetBot(bot.UserId, true)
|
||||
require.Nil(t, err2)
|
||||
|
||||
@@ -1048,7 +1048,7 @@ func TestGetPublicChannelsForTeam(t *testing.T) {
|
||||
expectedChannels = append(expectedChannels, rchannel)
|
||||
}
|
||||
|
||||
// Fetch public channels multipile times
|
||||
// Fetch public channels multiple times
|
||||
channelList, err := th.App.GetPublicChannelsForTeam(team.Id, 0, 5)
|
||||
require.Nil(t, err)
|
||||
channelList2, err := th.App.GetPublicChannelsForTeam(team.Id, 5, 5)
|
||||
@@ -1081,7 +1081,7 @@ func TestGetPrivateChannelsForTeam(t *testing.T) {
|
||||
expectedChannels = append(expectedChannels, rchannel)
|
||||
}
|
||||
|
||||
// Fetch private channels multipile times
|
||||
// Fetch private channels multiple times
|
||||
channelList, err := th.App.GetPrivateChannelsForTeam(team.Id, 0, 5)
|
||||
require.Nil(t, err)
|
||||
channelList2, err := th.App.GetPrivateChannelsForTeam(team.Id, 5, 5)
|
||||
@@ -2216,7 +2216,7 @@ func TestMarkChannelAsUnreadFromPostCollapsedThreadsTurnedOff(t *testing.T) {
|
||||
// user2: first root mention @user1
|
||||
// - user1: hello
|
||||
// - user2: mention @u1
|
||||
// - user1: another repoy
|
||||
// - user1: another reply
|
||||
// - user2: another mention @u1
|
||||
// user1: a root post
|
||||
// user2: Another root mention @u1
|
||||
|
||||
@@ -186,11 +186,11 @@ func (job *EmailBatchingJob) checkPendingNotifications(now time.Time, handler fu
|
||||
var interval int64
|
||||
preference, err := job.service.store.Preference().Get(userID, model.PreferenceCategoryNotifications, model.PreferenceNameEmailInterval)
|
||||
if err != nil {
|
||||
// use the default batching interval if an error ocurrs while fetching user preferences
|
||||
// use the default batching interval if an error occurs while fetching user preferences
|
||||
interval, _ = strconv.ParseInt(model.PreferenceEmailIntervalBatchingSeconds, 10, 64)
|
||||
} else {
|
||||
if value, err := strconv.ParseInt(preference.Value, 10, 64); err != nil {
|
||||
// // use the default batching interval if an error ocurrs while deserializing user preferences
|
||||
// // use the default batching interval if an error occurs while deserializing user preferences
|
||||
interval, _ = strconv.ParseInt(model.PreferenceEmailIntervalBatchingSeconds, 10, 64)
|
||||
} else {
|
||||
interval = value
|
||||
|
||||
@@ -387,7 +387,7 @@ func TestExportGMandDMChannels(t *testing.T) {
|
||||
channels, nErr = th2.App.Srv().Store.Channel().GetAllDirectChannelsForExportAfter(1000, "00000000")
|
||||
require.NoError(t, nErr)
|
||||
|
||||
// Adding some deteminism so its possible to assert on slice index
|
||||
// Adding some determinism so its possible to assert on slice index
|
||||
sort.Slice(channels, func(i, j int) bool { return channels[i].Type > channels[j].Type })
|
||||
assert.Equal(t, 2, len(channels))
|
||||
assert.ElementsMatch(t, []string{th1.BasicUser.Username, user1.Username, user2.Username}, *channels[0].Members)
|
||||
@@ -465,7 +465,7 @@ func TestExportDMandGMPost(t *testing.T) {
|
||||
posts, err = th2.App.Srv().Store.Post().GetDirectPostParentsForExportAfter(1000, "0000000")
|
||||
require.NoError(t, err)
|
||||
|
||||
// Adding some deteminism so its possible to assert on slice index
|
||||
// Adding some determinism so its possible to assert on slice index
|
||||
sort.Slice(posts, func(i, j int) bool { return posts[i].Message > posts[j].Message })
|
||||
assert.Equal(t, 4, len(posts))
|
||||
assert.ElementsMatch(t, gmMembers, *posts[0].ChannelMembers)
|
||||
|
||||
@@ -39,7 +39,7 @@ func extractTarGz(gzipStream io.Reader, dst string) error {
|
||||
return errors.Wrap(err, "failed to read next file from archive")
|
||||
}
|
||||
|
||||
// Pre-emptively check type flag to avoid reporting a misleading error in
|
||||
// Preemptively check type flag to avoid reporting a misleading error in
|
||||
// trying to sanitize the header name.
|
||||
switch header.Typeflag {
|
||||
case tar.TypeDir:
|
||||
|
||||
@@ -55,7 +55,7 @@ func NewSynchronizer(params SyncParams) (*Synchronizer, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
// EnsureReady blocks until the syncronizer is ready to update feature flag values
|
||||
// EnsureReady blocks until the synchronizer is ready to update feature flag values
|
||||
func (f *Synchronizer) EnsureReady() error {
|
||||
if err := f.client.BlockUntilReady(10); err != nil {
|
||||
return errors.Wrap(err, "split.io client could not initialize")
|
||||
|
||||
@@ -648,7 +648,7 @@ type UploadFileTask struct {
|
||||
imageType string
|
||||
imageOrientation int
|
||||
|
||||
// Testing: overrideable dependency functions
|
||||
// Testing: overridable dependency functions
|
||||
pluginsEnvironment *plugin.Environment
|
||||
writeFile func(io.Reader, string) (int64, *model.AppError)
|
||||
saveToDatabase func(*model.FileInfo) (*model.FileInfo, error)
|
||||
|
||||
@@ -617,7 +617,7 @@ func TestImportValidateUserImportData(t *testing.T) {
|
||||
data.NotifyProps.MentionKeys = ptrStr("valid")
|
||||
checkNoError(t, validateUserImportData(&data))
|
||||
|
||||
//Test the emai batching interval validators
|
||||
//Test the email batching interval validators
|
||||
//Happy paths
|
||||
data.EmailInterval = ptrStr("immediately")
|
||||
checkNoError(t, validateUserImportData(&data))
|
||||
|
||||
@@ -536,7 +536,7 @@ func (a *App) getAddManageSecureConnectionsPermissionsMigration() (permissionsMa
|
||||
Add: []string{PermissionManageSecureConnections},
|
||||
})
|
||||
|
||||
// remote the decprecated permission from system admin
|
||||
// remote the deprecated permission from system admin
|
||||
transformations = append(transformations,
|
||||
permissionTransformation{
|
||||
On: isRole(model.SystemAdminRoleId),
|
||||
@@ -667,7 +667,7 @@ func (a *App) getAddComplianceSubsectionPermissions() (permissionsMap, error) {
|
||||
Add: permissionsComplianceWrite,
|
||||
})
|
||||
|
||||
// Ancilary permissions
|
||||
// Ancillary permissions
|
||||
transformations = append(transformations, permissionTransformation{
|
||||
On: permissionExists(model.PermissionSysconsoleWriteComplianceDataRetentionPolicy.Id),
|
||||
Add: []string{model.PermissionCreateDataRetentionJob.Id},
|
||||
|
||||
@@ -639,7 +639,7 @@ func (a *App) mergePrepackagedPlugins(remoteMarketplacePlugins map[string]*model
|
||||
continue
|
||||
}
|
||||
|
||||
// If available in the markteplace, only overwrite if newer.
|
||||
// If available in the marketplace, only overwrite if newer.
|
||||
prepackagedVersion, err := semver.Parse(prepackaged.Manifest.Version)
|
||||
if err != nil {
|
||||
return model.NewAppError("mergePrepackagedPlugins", "app.plugin.invalid_version.app_error", nil, err.Error(), http.StatusBadRequest)
|
||||
|
||||
@@ -299,7 +299,7 @@ func (a *App) CreatePost(c *request.Context, post *model.Post, channel *model.Ch
|
||||
rPostCopy := rpost.Clone()
|
||||
|
||||
// FIXME: Removes PreviewPost from the post payload sent to the MessageHasBeenPosted hook so that plugins compiled with older versions of
|
||||
// Mattermost—without the gob registeration of the PreviewPost struct—won't crash.
|
||||
// Mattermost—without the gob registration of the PreviewPost struct—won't crash.
|
||||
if rPostCopy.Metadata != nil {
|
||||
rPostCopy.Metadata = rPostCopy.Metadata.Copy()
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ func (a *App) getLinkMetadata(requestURL string, timestamp int64, isNewPost bool
|
||||
referencedPostID := requestURL[len(requestURL)-26:]
|
||||
|
||||
referencedPost, appErr := a.GetSinglePost(referencedPostID)
|
||||
// TODO: Look into saving a value in the LinkMetadat.Data field to prevent perpetually re-querying for the deleted post.
|
||||
// TODO: Look into saving a value in the LinkMetadata.Data field to prevent perpetually re-querying for the deleted post.
|
||||
if appErr != nil {
|
||||
return nil, nil, nil, appErr
|
||||
}
|
||||
|
||||
@@ -929,7 +929,7 @@ func TestGetTeamMembers(t *testing.T) {
|
||||
return users[i].Id < users[j].Id
|
||||
})
|
||||
|
||||
// Fetch team members multipile times
|
||||
// Fetch team members multiple times
|
||||
members, err := th.App.GetTeamMembers(th.BasicTeam.Id, 0, 5, nil)
|
||||
require.Nil(t, err)
|
||||
|
||||
|
||||
@@ -2037,7 +2037,7 @@ func (a *App) GetViewUsersRestrictions(userID string) (*model.ViewUsersRestricti
|
||||
return &model.ViewUsersRestrictions{Teams: teamIDsWithPermission, Channels: channelIDs}, nil
|
||||
}
|
||||
|
||||
// PromoteGuestToUser Convert user's roles and all his mermbership's roles from
|
||||
// PromoteGuestToUser Convert user's roles and all his membership's roles from
|
||||
// guest roles to regular user roles.
|
||||
func (a *App) PromoteGuestToUser(c *request.Context, user *model.User, requestorId string) *model.AppError {
|
||||
nErr := a.ch.srv.userService.PromoteGuestToUser(user)
|
||||
@@ -2097,7 +2097,7 @@ func (a *App) PromoteGuestToUser(c *request.Context, user *model.User, requestor
|
||||
return nil
|
||||
}
|
||||
|
||||
// DemoteUserToGuest Convert user's roles and all his mermbership's roles from
|
||||
// DemoteUserToGuest Convert user's roles and all his membership's roles from
|
||||
// regular user roles to guest roles.
|
||||
func (a *App) DemoteUserToGuest(user *model.User) *model.AppError {
|
||||
demotedUser, nErr := a.ch.srv.userService.DemoteUserToGuest(user)
|
||||
|
||||
@@ -120,7 +120,7 @@ func TestAdjustProfileImage(t *testing.T) {
|
||||
assert.True(t, adjusted.Len() > 0)
|
||||
assert.NotEqual(t, testjpg, adjusted)
|
||||
|
||||
// default image should require adjustement
|
||||
// default image should require adjustment
|
||||
user := th.BasicUser
|
||||
image, err := th.App.GetDefaultProfileImage(user)
|
||||
require.Nil(t, err)
|
||||
@@ -524,7 +524,7 @@ func TestUpdateUserEmail(t *testing.T) {
|
||||
tokens, err = th.App.Srv().Store.Token().GetAllTokensByType(TokenTypeVerifyEmail)
|
||||
// We verify the same conditions as the earlier function,
|
||||
// but we also need to ensure that this is not the same token
|
||||
// as before, which is possible if the token updation goroutine
|
||||
// as before, which is possible if the token update goroutine
|
||||
// hasn't yet run.
|
||||
return err == nil && len(tokens) == 1 && tokens[0].Token != firstToken.Token
|
||||
}, 100*time.Millisecond, 10*time.Millisecond)
|
||||
|
||||
@@ -47,7 +47,7 @@ func (us *UserService) isPasswordValid(password string) error {
|
||||
}
|
||||
|
||||
// IsPasswordValidWithSettings is a utility functions that checks if the given password
|
||||
// comforms to the password settings. It returns the error id as error value.
|
||||
// conforms to the password settings. It returns the error id as error value.
|
||||
func IsPasswordValidWithSettings(password string, settings *model.PasswordSettings) error {
|
||||
id := "model.user.is_valid.pwd"
|
||||
isError := false
|
||||
|
||||
Ссылка в новой задаче
Block a user