back_recharge
wangyuan 2019-09-12 11:38:09 +08:00
parent eddd5459e0
commit 96bf9d7482
1 changed files with 15 additions and 8 deletions

View File

@ -99,14 +99,23 @@ public class ChatLogic {
return;
}
FriendManager friendManager = user.getFriendManager();
boolean result = true;
long nowTime = System.currentTimeMillis();
long nowTime = System.currentTimeMillis();
String tmp = SensitivewordFilter.replaceSensitiveWord(message, 1, "*");
if(!tmp.equals(message)){
ChatProto.ChatInfo chatInfo = CBean2Proto.getChatInfoBuilder(user,tmp,nowTime,-1);
ChatProto.SendChatInfoResponse response = ChatProto.SendChatInfoResponse.newBuilder().setChatInfo(chatInfo).build();
MessageUtil.sendMessage(iSession,1,msgId,response,true);
return;
}
boolean result = true;
switch (chatType){
case 1:
//0|content需要解字符串
String s = message;
String[] strs = message.split("\\|",3);
String[] strs = message.split("|",3);
if(strs.length==3){
message = strs[2];
}
@ -121,13 +130,11 @@ public class ChatLogic {
default:
break;
}
if (!result) {
String s = SensitivewordFilter.replaceSensitiveWord(message, 1, "*");
// MessageUtil.sendErrorResponse(iSession, 0, msgId, "包含敏感字");
ChatProto.ChatInfo chatInfo = CBean2Proto.getChatInfoBuilder(user,s,nowTime,-1);
if(!result){
ChatProto.ChatInfo chatInfo = CBean2Proto.getChatInfoBuilder(user,tmp,nowTime,-1);
ChatProto.SendChatInfoResponse response = ChatProto.SendChatInfoResponse.newBuilder().setChatInfo(chatInfo).build();
MessageUtil.sendMessage(iSession,1,msgId,response,true);
return ;
return;
}
switch (chatType){