diff --git a/modules/DebugTools/Handler.cs b/modules/DebugTools/Handler.cs index d803611..b1080b5 100644 --- a/modules/DebugTools/Handler.cs +++ b/modules/DebugTools/Handler.cs @@ -1,18 +1,23 @@ -using BotFramework; +using System.Text.Encodings.Web; +using BotFramework; using BotFramework.Attributes; using BotFramework.Enums; using BotFramework.Utils; using Kruzya.TelegramBot.Core.Extensions; using Kruzya.TelegramBot.Core.Service; using System.Text.Json; +using Telegram.Bot; namespace West.TelegramBot.DebugTools; public class Handler : BotEventHandler { private readonly UserService _userService; - private static readonly JsonSerializerOptions DumpOptions = new() { WriteIndented = true }; - + private static readonly JsonSerializerOptions DumpOptions = new(JsonBotAPI.Options) + { + WriteIndented = true, + Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping + }; public Handler(UserService userService) {