Skip to content

Commit

Permalink
chore: small revert of withRetries
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed Jan 1, 2025
1 parent 25cf88b commit 02fb217
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1225,12 +1225,12 @@ export class Bot<
await this.init();

if (!webhook) {
const r = await withRetries(() =>
this.api.deleteWebhook({
drop_pending_updates: dropPendingUpdates,
suppress: true,
}),
);
// const r = await withRetries(() =>
await this.api.deleteWebhook({
drop_pending_updates: dropPendingUpdates,
// suppress: true,
});
// );

this.updates.startPolling({
allowed_updates: allowedUpdates,
Expand All @@ -1249,14 +1249,14 @@ export class Bot<
if (this.updates.isStarted) this.updates.stopPolling();

// TODO: do we need await it?
withRetries(() =>
this.api.setWebhook({
...webhook,
drop_pending_updates: dropPendingUpdates,
allowed_updates: allowedUpdates,
suppress: true,
}),
);
// withRetries(() =>
await this.api.setWebhook({
...webhook,
drop_pending_updates: dropPendingUpdates,
allowed_updates: allowedUpdates,
// suppress: true,
});
// );

this.runImmutableHooks("onStart", {
plugins: this.dependencies,
Expand Down

0 comments on commit 02fb217

Please sign in to comment.