Skip to content

Commit 09ebd16

Browse files
committed
add dropPendingUpdates supports for webhook
1 parent ba7e2d0 commit 09ebd16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/telebot/private/webhook.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ proc getWebhookInfo*(b: TeleBot): Future[WebhookInfo] {.async.} =
6262
result = getWebhookInfo(res)
6363

6464

65-
proc startWebhook*(b: Telebot, secret, url: string, port=Port(8080), clean = false) =
65+
proc startWebhook*(b: Telebot, secret, url: string, port=Port(8080), dropPendingUpdates = false) =
6666
try:
6767
let me = waitFor b.getMe()
6868
b.id = me.id
@@ -71,7 +71,7 @@ proc startWebhook*(b: Telebot, secret, url: string, port=Port(8080), clean = fal
7171
except IOError, OSError:
7272
d("Unable to fetch my info ", getCurrentExceptionMsg())
7373

74-
waitFor b.setWebhook(url)
74+
waitFor b.setWebhook(url, dropPendingUpdates = dropPendingUpdates)
7575

7676
proc callback(req: Request) {.async.} =
7777
let headers = newHttpHeaders([("content-type", "text/plain")])

0 commit comments

Comments
 (0)