[MM-16751] golint model (#17896)
Этот коммит содержится в:
коммит произвёл
Claudio Costa
родитель
953eebdef4
Коммит
97ccf0bdf6
@@ -54,7 +54,7 @@ func (a *App) getSuggestions(c *request.Context, commandArgs *model.CommandArgs,
|
||||
|
||||
if index == -1 { // no space in input
|
||||
for _, command := range commands {
|
||||
if strings.HasPrefix(command.Trigger, strings.ToLower(inputToBeParsed)) && (command.RoleID == roleID || roleID == model.SYSTEM_ADMIN_ROLE_ID || roleID == "") {
|
||||
if strings.HasPrefix(command.Trigger, strings.ToLower(inputToBeParsed)) && (command.RoleID == roleID || roleID == model.SystemAdminRoleId || roleID == "") {
|
||||
s := model.AutocompleteSuggestion{
|
||||
Complete: inputParsed + command.Trigger,
|
||||
Suggestion: command.Trigger,
|
||||
@@ -71,7 +71,7 @@ func (a *App) getSuggestions(c *request.Context, commandArgs *model.CommandArgs,
|
||||
if command.Trigger != strings.ToLower(inputToBeParsed[:index]) {
|
||||
continue
|
||||
}
|
||||
if roleID != "" && roleID != model.SYSTEM_ADMIN_ROLE_ID && roleID != command.RoleID {
|
||||
if roleID != "" && roleID != model.SystemAdminRoleId && roleID != command.RoleID {
|
||||
continue
|
||||
}
|
||||
toBeParsed := inputToBeParsed[index+1:]
|
||||
|
||||
Ссылка в новой задаче
Block a user