MM-22355 - Fix typos detected by goreportcad.com (#13842)
* Update webhook_test.go * Update user_test.go * Update filesstore_test.go * Update plugin_requests.go * Update syncables.go * Update helper.go * Update html_entities.go * Update user.go * Update team.go * Update notification.go * Update notification_test.go * Update plugin_api_test.go * Update post_metadata.go * Update channel_test.go * Update database.go * Update channel.go * Update user_store.go * Update team_test.go * revert andd * Revert back to infintie Co-authored-by: Jesús Espino <jespinog@gmail.com> Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
@@ -703,7 +703,7 @@ type PostNotification struct {
|
||||
}
|
||||
|
||||
// Returns the name of the channel for this notification. For direct messages, this is the sender's name
|
||||
// preceeded by an at sign. For group messages, this is a comma-separated list of the members of the
|
||||
// preceded by an at sign. For group messages, this is a comma-separated list of the members of the
|
||||
// channel, with an option to exclude the recipient of the message from that list.
|
||||
func (n *PostNotification) GetChannelName(userNameFormat, excludeId string) string {
|
||||
switch n.Channel.Type {
|
||||
|
||||
@@ -247,7 +247,7 @@ func TestFilterOutOfChannelMentions(t *testing.T) {
|
||||
assert.Nil(t, outOfGroupUsers)
|
||||
})
|
||||
|
||||
t.Run("should not return results for non-existant users", func(t *testing.T) {
|
||||
t.Run("should not return results for non-existent users", func(t *testing.T) {
|
||||
post := &model.Post{}
|
||||
potentialMentions := []string{"foo", "bar"}
|
||||
|
||||
|
||||
@@ -919,7 +919,7 @@ func pluginAPIHookTest(t *testing.T, th *TestHelper, fileName string, id string,
|
||||
// 2. For each folder - compiles the main.go inside and executes it, validating it's result
|
||||
// 3. If folder starts with "manual." it is skipped ("manual." tests executed in other part of this file)
|
||||
// 4. Before compiling the main.go file is passed through templating and the following values are available in the template: BasicUser, BasicUser2, BasicChannel, BasicTeam, BasicPost
|
||||
// 5. Succesfully running test should return nil, "OK". Any other returned string is considered and error
|
||||
// 5. Successfully running test should return nil, "OK". Any other returned string is considered and error
|
||||
|
||||
func TestBasicAPIPlugins(t *testing.T) {
|
||||
defaultSchema := getDefaultPluginSettingsSchema()
|
||||
|
||||
@@ -45,7 +45,7 @@ func (a *App) ServePluginRequest(w http.ResponseWriter, r *http.Request) {
|
||||
func (a *App) ServeInterPluginRequest(w http.ResponseWriter, r *http.Request, sourcePluginId, destinationPluginId string) {
|
||||
pluginsEnvironment := a.GetPluginsEnvironment()
|
||||
if pluginsEnvironment == nil {
|
||||
err := model.NewAppError("ServeInterPluginRequest", "app.plugin.disabled.app_error", nil, "Plugin enviroment not found.", http.StatusNotImplemented)
|
||||
err := model.NewAppError("ServeInterPluginRequest", "app.plugin.disabled.app_error", nil, "Plugin environment not found.", http.StatusNotImplemented)
|
||||
a.Log().Error(err.Error())
|
||||
w.WriteHeader(err.StatusCode)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
||||
@@ -72,7 +72,7 @@ func (a *App) OverrideIconURLIfEmoji(post *model.Post) {
|
||||
if emojiUrl, err := a.GetEmojiStaticUrl(emojiName); err == nil {
|
||||
post.AddProp(model.POST_PROPS_OVERRIDE_ICON_URL, emojiUrl)
|
||||
} else {
|
||||
mlog.Warn("Failed to retrieve URL for overriden profile icon (emoji)", mlog.String("emojiName", emojiName), mlog.Err(err))
|
||||
mlog.Warn("Failed to retrieve URL for overridden profile icon (emoji)", mlog.String("emojiName", emojiName), mlog.Err(err))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ func (a *App) DeleteGroupConstrainedMemberships() error {
|
||||
|
||||
// deleteGroupConstrainedTeamMemberships deletes team memberships of users who aren't members of the allowed
|
||||
// groups of the given group-constrained team. If a teamID is given then the procedure is scoped to the given team,
|
||||
// if teamID is nil then the proceedure affects all teams.
|
||||
// if teamID is nil then the procedure affects all teams.
|
||||
func (a *App) deleteGroupConstrainedTeamMemberships(teamID *string) error {
|
||||
teamMembers, appErr := a.TeamMembersToRemove(teamID)
|
||||
if appErr != nil {
|
||||
@@ -147,7 +147,7 @@ func (a *App) deleteGroupConstrainedTeamMemberships(teamID *string) error {
|
||||
|
||||
// deleteGroupConstrainedChannelMemberships deletes channel memberships of users who aren't members of the allowed
|
||||
// groups of the given group-constrained channel. If a channelID is given then the procedure is scoped to the given team,
|
||||
// if channelID is nil then the proceedure affects all teams.
|
||||
// if channelID is nil then the procedure affects all teams.
|
||||
func (a *App) deleteGroupConstrainedChannelMemberships(channelID *string) error {
|
||||
channelMembers, appErr := a.ChannelMembersToRemove(channelID)
|
||||
if appErr != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user