telegram-botbuilder 1.0.19 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -321,6 +321,8 @@ var BotBuilder = /** @class */ (function () {
321
321
  b++;
322
322
  return [3 /*break*/, 1];
323
323
  case 8:
324
+ if (dialog == undefined)
325
+ markup = [[{ text: "Меню", callback_data: this._schema.start }]];
324
326
  if (!(typeof (dialog === null || dialog === void 0 ? void 0 : dialog.text) === 'function')) return [3 /*break*/, 10];
325
327
  return [4 /*yield*/, (dialog === null || dialog === void 0 ? void 0 : dialog.text(chat))];
326
328
  case 9:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telegram-botbuilder",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "main": "lib/index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -167,6 +167,7 @@ export class BotBuilder {
167
167
  }
168
168
  }
169
169
 
170
+ if (dialog == undefined) markup = [[{text: "Меню", callback_data: this._schema.start}]];
170
171
  let text = typeof dialog?.text === 'function' ? await dialog?.text(chat) : dialog?.text;
171
172
  try {
172
173
  await this._bot.editMessageText(text || "404", { chat_id: chat, message_id: this._userdialogs[chat].lastid, reply_markup: { inline_keyboard: markup || [] }})