-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Thare are no checks if Name already exists in function executeAdd:
server/autolinkplugin/command.go:
`
func executeAdd(p *Plugin, c *plugin.Context, header *model.CommandArgs, args ...string) *model.CommandResponse {
if len(args) > 1 {
return responsef(helpText)
}
name := ""
if len(args) == 1 {
name = args[0]
}
err := saveConfigLinks(p, append(p.getConfig().Links, autolink.Autolink{
Name: name,
}))
if err != nil {
return responsef(err.Error())
}
if name == "" {
return executeList(p, c, header)
}
return executeList(p, c, header, name)
}
`
After adding second rule with the same name we can't change prev or new rule or even delete new one. Instead we got this message:
"Visa" matched more than one link: ["Visa" "Visa"]
So we can fix that by checking name in existing rules.
Metadata
Metadata
Assignees
Labels
No labels