From b774cbc5cf754a7ab355c7bd80eb79d63bff34a6 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期日, 23 二月 2025 18:21:47 +0800
Subject: [PATCH] 0312 聊天输入框优化,表情不过滤脏字
---
System/Chat/ChatSendComponent.cs | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/System/Chat/ChatSendComponent.cs b/System/Chat/ChatSendComponent.cs
index 2b19c20..fe36f01 100644
--- a/System/Chat/ChatSendComponent.cs
+++ b/System/Chat/ChatSendComponent.cs
@@ -164,12 +164,13 @@
m_OnChating = true;
string msg = m_ChatInput.text;
+ string tmpMsg = ImgAnalysis.ReplaceFace(msg, out int faceCount);
- if (DirtyWordConfig.IsDirtWord(msg))
+ if (DirtyWordConfig.IsDirtWord(tmpMsg))
{
- msg = DirtyWordConfig.IsDirtWord(msg, '*');
- msg = msg.Replace("*", "");
- m_ChatInput.text = msg;
+ tmpMsg = DirtyWordConfig.IsDirtWord(tmpMsg, '*');
+ tmpMsg = tmpMsg.Replace("*", "");
+ m_ChatInput.text = tmpMsg;
SysNotifyMgr.Instance.ShowTip("DirtyWordWarn");
m_OnChating = false;
return;
--
Gitblit v1.8.0