fix(admin.gbapp): /publish can be called with no CUI.

This commit is contained in:
Rodrigo Rodriguez 2020-05-23 19:58:38 -03:00
parent 093e0a9e9f
commit a469d6da6a

View file

@ -188,8 +188,9 @@ export class AdminDialog extends IGBDialog {
await min.conversationalService.sendText(min, step, Messages[locale].working('Publishing'));
step.activeDialog.state.options.args = (step.options as any).args;
let args = step.activeDialog.state.options.args.split(' ');
let filename = args[0];
const filename = step.activeDialog.state.options.args ?
step.activeDialog.state.options.args.split(' ')[0] : null;
const packages = [];
if (filename === null || filename === "") {
await min.conversationalService.sendText(min, step, `Starting publishing for ${botId}.gbkb...`);