From 13e14f913d4a33c66826977976761a2beeefbee7 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Thu, 9 Oct 2025 00:31:32 -0500 Subject: [PATCH] Change logger for edit length to only log if it's too long --- KfChatDotNetWsClient/ChatClient.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/KfChatDotNetWsClient/ChatClient.cs b/KfChatDotNetWsClient/ChatClient.cs index 0c29583..a11302e 100644 --- a/KfChatDotNetWsClient/ChatClient.cs +++ b/KfChatDotNetWsClient/ChatClient.cs @@ -250,7 +250,11 @@ public class ChatClient _logger.Debug($"Editing {messageId} with '{newMessage}'"); if (_wsClient == null) throw new WebSocketNotInitializedException(); var msg = $"/edit {payload}"; - _logger.Info($"Edit message will be {Encoding.UTF8.GetByteCount(msg)} bytes long"); + var length = Encoding.UTF8.GetByteCount(msg); + if (length > 1023) + { + _logger.Error($"Edit message is too long at {length} bytes"); + } await _wsClient.SendInstant($"/edit {payload}"); }