Skip to content
This repository was archived by the owner on Jun 18, 2022. It is now read-only.

Commit dfaef7f

Browse files
authored
Merge pull request #21 from TelegramBots/develop
Release v1.0.1
2 parents 79d91f2 + 168707a commit dfaef7f

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

Diff for: .github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
USE_CI_FEED: false
9-
VERSION: 1.0.0
9+
VERSION: 1.0.1
1010
IS_PRERELEASE: false
1111
PROJECT_PATH: src/Telegram.Bot.Extensions.Polling/Telegram.Bot.Extensions.Polling.csproj
1212
CONFIGURATION: Release

Diff for: CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
2323

2424
## [Unreleased]
2525

26+
### Fixed
27+
28+
- Fixed timeout for throwing out pending updates on start
29+
30+
## [1.0.0] - 2021-11-17
31+
2632
### Changed
2733
- All method arguments that accept `ReceiverOptions` are renamed from `receiveOptions` to `receiverOptions`
2834

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ try
152152
{
153153
if (update.Message is Message message)
154154
{
155-
await Bot.SendTextMessageAsync(
155+
await bot.SendTextMessageAsync(
156156
message.Chat,
157157
$"Still have to process {updateReceiver.PendingUpdates} updates"
158158
);
159159
}
160160
}
161161
}
162-
catch (OperationCancelledException exception)
162+
catch (OperationCanceledException exception)
163163
{
164164
}
165165
```

Diff for: src/Telegram.Bot.Extensions.Polling/Extensions/TelegramBotClientExtensions.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@ internal static async Task<int> ThrowOutPendingUpdatesAsync(
2121
this ITelegramBotClient botClient,
2222
CancellationToken cancellationToken = default)
2323
{
24-
var timeout = (int) botClient.Timeout.TotalSeconds;
2524
var request = new GetUpdatesRequest
2625
{
2726
Limit = 1,
2827
Offset = -1,
29-
Timeout = timeout,
28+
Timeout = 0,
3029
AllowedUpdates = Array.Empty<UpdateType>(),
3130
};
3231
var updates = await botClient.MakeRequestAsync(request: request, cancellationToken: cancellationToken)

0 commit comments

Comments
 (0)