We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 21234da + 3c27419 commit bd330c2Copy full SHA for bd330c2
1 file changed
BotWorker/BotWorkerWebHookServer.cs
@@ -43,10 +43,10 @@ protected override async Task StartHandleAsync() {
43
private async Task HandlePostRequestAsync(HttpListenerContext context) {
44
try {
45
using (var reader = new StreamReader(context.Request.InputStream)) {
46
- if (ValidateTelegramHeader(context.Request.Headers["X-Telegram-Bot-Api-Secret-Token"])) {
47
- context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
48
- return;
49
- }
+ if (!ValidateTelegramHeader(context.Request.Headers["X-Telegram-Bot-Api-Secret-Token"])) {
+ context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
+ return;
+ }
50
51
var body = await reader.ReadToEndAsync();
52
_ = Task.Run(async () => {
0 commit comments