From eef56d3f6b46bd3fc32a4b7564f41653ae109d40 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Sun, 11 Aug 2024 22:36:25 +0800 Subject: [PATCH] Decode entities in incoming message --- KfChatDotNetBot/Commands/TestCommands.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/KfChatDotNetBot/Commands/TestCommands.cs b/KfChatDotNetBot/Commands/TestCommands.cs index cc25c76..9f829e8 100644 --- a/KfChatDotNetBot/Commands/TestCommands.cs +++ b/KfChatDotNetBot/Commands/TestCommands.cs @@ -1,4 +1,5 @@ -using System.Text.RegularExpressions; +using System.Net; +using System.Text.RegularExpressions; using KfChatDotNetBot.Models; using KfChatDotNetBot.Models.DbModels; using KfChatDotNetWsClient.Models.Events; @@ -19,7 +20,7 @@ public class EditTestCommand : ICommand public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx) { var logger = LogManager.GetCurrentClassLogger(); - var msg = arguments["msg"].Value; + var msg = WebUtility.HtmlDecode(arguments["msg"].Value); var iterations = 3; var i = 0; var delay = 1000;