fix: provide correct serializer options for update deserializer

This commit is contained in:
Andriy
2025-02-10 00:48:16 +02:00
parent ce8358d1ad
commit eb1d4ff14e
+2 -1
View File
@@ -6,6 +6,7 @@ using Microsoft.Extensions.Options;
using System.IO; using System.IO;
using System.Text.Json; using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
using Telegram.Bot;
using Telegram.Bot.Types; using Telegram.Bot.Types;
namespace Kruzya.TelegramBot.Core.Controllers namespace Kruzya.TelegramBot.Core.Controllers
@@ -47,7 +48,7 @@ namespace Kruzya.TelegramBot.Core.Controllers
} }
var body = await (new StreamReader(Request.Body)).ReadToEndAsync(); var body = await (new StreamReader(Request.Body)).ReadToEndAsync();
LaunchHandle(JsonSerializer.Deserialize<Update>(body)); LaunchHandle(JsonSerializer.Deserialize<Update>(body, JsonBotAPI.Options));
return Ok(); return Ok();
} }