PLT-2553 Additional backstage UI Improvements (#2673)
* Renamed Commands to Slash Commands in backstage UI * Updated displayed info for listed commands and outgoing webhooks * Disallowed empty outgoing webhook trigger words and improved client-side validation for them
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
81e7e85369
Коммит
29e1a85360
@@ -98,6 +98,14 @@ func (o *OutgoingWebhook) IsValid() *AppError {
|
||||
return NewLocAppError("OutgoingWebhook.IsValid", "model.outgoing_hook.is_valid.words.app_error", nil, "")
|
||||
}
|
||||
|
||||
if len(o.TriggerWords) != 0 {
|
||||
for _, triggerWord := range o.TriggerWords {
|
||||
if len(triggerWord) == 0 {
|
||||
return NewLocAppError("OutgoingWebhook.IsValid", "model.outgoing_hook.is_valid.trigger_words.app_error", nil, "")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(o.CallbackURLs) == 0 || len(fmt.Sprintf("%s", o.CallbackURLs)) > 1024 {
|
||||
return NewLocAppError("OutgoingWebhook.IsValid", "model.outgoing_hook.is_valid.callback.app_error", nil, "")
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user