telegram-botbuilder 1.0.14 → 1.0.15
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.
- package/lib/bot-service.js +2 -2
- package/package.json +1 -1
- package/src/bot-service.ts +2 -2
package/lib/bot-service.js
CHANGED
|
@@ -206,7 +206,7 @@ var BotBuilder = /** @class */ (function () {
|
|
|
206
206
|
mwb = this._mwbreak[desc];
|
|
207
207
|
if (typeof mwb === 'boolean')
|
|
208
208
|
return [2 /*return*/, mwb];
|
|
209
|
-
if (!(
|
|
209
|
+
if (!(mwb === null)) return [3 /*break*/, 2];
|
|
210
210
|
return [4 /*yield*/, this._mwba(desc)];
|
|
211
211
|
case 1: return [2 /*return*/, _c.sent()];
|
|
212
212
|
case 2:
|
|
@@ -231,7 +231,7 @@ var BotBuilder = /** @class */ (function () {
|
|
|
231
231
|
return [3 /*break*/, 3];
|
|
232
232
|
case 7:
|
|
233
233
|
this._mwbreak[desc] = res;
|
|
234
|
-
this.ActionSystem.emit("mwb_".concat(desc));
|
|
234
|
+
this.ActionSystem.emit("mwb_".concat(desc), res);
|
|
235
235
|
return [2 /*return*/, res];
|
|
236
236
|
}
|
|
237
237
|
});
|
package/package.json
CHANGED
package/src/bot-service.ts
CHANGED
|
@@ -38,7 +38,7 @@ export class BotBuilder {
|
|
|
38
38
|
let desc = `${chat}_${(msg as TelegramBot.Message).message_id || (msg as TelegramBot.CallbackQuery).id}`;
|
|
39
39
|
let mwb = this._mwbreak[desc];
|
|
40
40
|
if (typeof mwb === 'boolean') return mwb;
|
|
41
|
-
if (
|
|
41
|
+
if (mwb === null) return await this._mwba(desc);
|
|
42
42
|
this._mwbreak[desc] = null;
|
|
43
43
|
|
|
44
44
|
let res = false;
|
|
@@ -46,7 +46,7 @@ export class BotBuilder {
|
|
|
46
46
|
res = res || await mw(chat, msg);
|
|
47
47
|
}
|
|
48
48
|
this._mwbreak[desc] = res;
|
|
49
|
-
this.ActionSystem.emit(`mwb_${desc}
|
|
49
|
+
this.ActionSystem.emit(`mwb_${desc}`, res);
|
|
50
50
|
return res;
|
|
51
51
|
}
|
|
52
52
|
|