Revert "Fix initialism errors (PR-3) (#17062)" (#17202)

This reverts commit ea61458f16. This was causing panic in the plugins because the client and the plugin API changed with this PR
Этот коммит содержится в:
Mario de Frutos Dieguez
2021-03-23 10:32:54 +01:00
коммит произвёл GitHub
родитель 26b86cb3ef
Коммит c0971970e9
26 изменённых файлов: 1146 добавлений и 1146 удалений

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

@@ -191,19 +191,19 @@ func (a *App) ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *
}
trigger = strings.TrimPrefix(trigger, "/")
clientTriggerID, triggerID, appErr := model.GenerateTriggerId(args.UserId, a.AsymmetricSigningKey())
clientTriggerId, triggerId, appErr := model.GenerateTriggerId(args.UserId, a.AsymmetricSigningKey())
if appErr != nil {
mlog.Warn("error occurred in generating trigger Id for a user ", mlog.Err(appErr))
}
args.TriggerId = triggerID
args.TriggerId = triggerId
// Plugins can override built in and custom commands
cmd, response, appErr := a.tryExecutePluginCommand(args)
if appErr != nil {
return nil, appErr
} else if cmd != nil && response != nil {
response.TriggerId = clientTriggerID
response.TriggerId = clientTriggerId
return a.HandleCommandResponse(cmd, args, response, true)
}
@@ -212,7 +212,7 @@ func (a *App) ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *
if appErr != nil {
return nil, appErr
} else if cmd != nil && response != nil {
response.TriggerId = clientTriggerID
response.TriggerId = clientTriggerId
return a.HandleCommandResponse(cmd, args, response, false)
}
@@ -229,7 +229,7 @@ func (a *App) ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *
func (a *App) MentionsToTeamMembers(message, teamID string) model.UserMentionMap {
type mentionMapItem struct {
Name string
ID string
Id string
}
possibleMentions := model.PossibleAtMentions(message)
@@ -290,7 +290,7 @@ func (a *App) MentionsToTeamMembers(message, teamID string) model.UserMentionMap
atMentionMap := make(model.UserMentionMap)
for mention := range mentionChan {
atMentionMap[mention.Name] = mention.ID
atMentionMap[mention.Name] = mention.Id
}
return atMentionMap
@@ -301,7 +301,7 @@ func (a *App) MentionsToTeamMembers(message, teamID string) model.UserMentionMap
func (a *App) MentionsToPublicChannels(message, teamID string) model.ChannelMentionMap {
type mentionMapItem struct {
Name string
ID string
Id string
}
channelMentions := model.ChannelMentions(message)
@@ -330,7 +330,7 @@ func (a *App) MentionsToPublicChannels(message, teamID string) model.ChannelMent
channelMentionMap := make(model.ChannelMentionMap)
for mention := range mentionChan {
channelMentionMap[mention.Name] = mention.ID
channelMentionMap[mention.Name] = mention.Id
}
return channelMentionMap