app/slashcommands/command_loadtest: fix decoding error (#17199)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1578e25537
Коммит
adcddf350e
@@ -540,6 +540,9 @@ func (*LoadTestProvider) JsonCommand(a *app.App, args *model.CommandArgs, messag
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
post := model.PostFromJson(r.Body)
|
post := model.PostFromJson(r.Body)
|
||||||
|
if post == nil {
|
||||||
|
return &model.CommandResponse{Text: "Unable to decode post", ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL}, errors.Errorf("could not decode post from json")
|
||||||
|
}
|
||||||
post.ChannelId = args.ChannelId
|
post.ChannelId = args.ChannelId
|
||||||
post.UserId = args.UserId
|
post.UserId = args.UserId
|
||||||
if post.Message == "" {
|
if post.Message == "" {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user