mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
fix: provide correct serializer options for update deserializer
This commit is contained in:
@@ -6,6 +6,7 @@ using Microsoft.Extensions.Options;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Telegram.Bot;
|
||||
using Telegram.Bot.Types;
|
||||
|
||||
namespace Kruzya.TelegramBot.Core.Controllers
|
||||
@@ -47,7 +48,7 @@ namespace Kruzya.TelegramBot.Core.Controllers
|
||||
}
|
||||
|
||||
var body = await (new StreamReader(Request.Body)).ReadToEndAsync();
|
||||
LaunchHandle(JsonSerializer.Deserialize<Update>(body));
|
||||
LaunchHandle(JsonSerializer.Deserialize<Update>(body, JsonBotAPI.Options));
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user