grammy 1.15.0 → 1.15.1

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/README.md CHANGED
@@ -264,6 +264,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
264
264
  <td align="center" valign="top" width="14.28%"><a href="https://www.shrimadhavuk.me/"><img src="https://avatars.githubusercontent.com/u/6317196?v=4?s=100" width="100px;" alt="Shrimadhav U K"/><br /><sub><b>Shrimadhav U K</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=SpEcHiDe" title="Code">💻</a></td>
265
265
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/binamralamsal"><img src="https://avatars.githubusercontent.com/u/61900781?v=4?s=100" width="100px;" alt="Binamra Lamsal"/><br /><sub><b>Binamra Lamsal</b></sub></a><br /><a href="#ideas-binamralamsal" title="Ideas, Planning, & Feedback">🤔</a></td>
266
266
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/gertminov"><img src="https://avatars.githubusercontent.com/u/78727928?v=4?s=100" width="100px;" alt="gertminov"/><br /><sub><b>gertminov</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=gertminov" title="Documentation">📖</a> <a href="#tutorial-gertminov" title="Tutorials">✅</a></td>
267
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/amanape"><img src="https://avatars.githubusercontent.com/u/83104063?v=4?s=100" width="100px;" alt="Stephan Psaras"/><br /><sub><b>Stephan Psaras</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Aamanape" title="Bug reports">🐛</a></td>
267
268
  </tr>
268
269
  </tbody>
269
270
  </table>
package/out/bot.js CHANGED
@@ -241,6 +241,10 @@ a known bot info object.");
241
241
  debug("Simple long polling already running!");
242
242
  return;
243
243
  }
244
+ else {
245
+ this.pollingRunning = true;
246
+ this.pollingAbortController = new shim_node_js_1.AbortController();
247
+ }
244
248
  await withRetries(() => {
245
249
  var _a;
246
250
  return this.api.deleteWebhook({
@@ -324,8 +328,6 @@ you can circumvent this protection against memory leaks.`);
324
328
  */
325
329
  async loop(options) {
326
330
  var _a;
327
- this.pollingRunning = true;
328
- this.pollingAbortController = new shim_node_js_1.AbortController();
329
331
  const limit = options === null || options === void 0 ? void 0 : options.limit;
330
332
  const timeout = (_a = options === null || options === void 0 ? void 0 : options.timeout) !== null && _a !== void 0 ? _a : 30; // seconds
331
333
  let allowed_updates = options === null || options === void 0 ? void 0 : options.allowed_updates;
package/out/web.mjs CHANGED
@@ -4148,6 +4148,9 @@ a known bot info object.");
4148
4148
  if (this.pollingRunning) {
4149
4149
  debug1("Simple long polling already running!");
4150
4150
  return;
4151
+ } else {
4152
+ this.pollingRunning = true;
4153
+ this.pollingAbortController = new AbortController();
4151
4154
  }
4152
4155
  await withRetries(()=>this.api.deleteWebhook({
4153
4156
  drop_pending_updates: options?.drop_pending_updates
@@ -4189,8 +4192,6 @@ you can circumvent this protection against memory leaks.`);
4189
4192
  this.errorHandler = errorHandler;
4190
4193
  }
4191
4194
  async loop(options) {
4192
- this.pollingRunning = true;
4193
- this.pollingAbortController = new AbortController();
4194
4195
  const limit = options?.limit;
4195
4196
  const timeout = options?.timeout ?? 30;
4196
4197
  let allowed_updates = options?.allowed_updates;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "grammy",
3
3
  "description": "The Telegram Bot Framework.",
4
- "version": "1.15.0",
4
+ "version": "1.15.1",
5
5
  "author": "KnorpelSenf",
6
6
  "license": "MIT",
7
7
  "engines": {