修复消息抄送问题

This commit is contained in:
liaozetao
2023-10-27 10:51:54 +08:00
parent 14ee0fae3e
commit 0a9178c89a

View File

@@ -31,7 +31,11 @@ public class UserChatMsgListener implements ApplicationListener<UserChatMsgEvent
return;
}
IMChatMsgDTO chatMsg = (IMChatMsgDTO) source;
String content = chatMsg.getBody();
String content = chatMsg.getAttach();
String body = chatMsg.getBody();
if (StrUtil.isNotEmpty(body)) {
content = body;
}
if (StrUtil.isEmpty(content) && StrUtil.isNotEmpty(chatMsg.getAttach())) {
String attach = chatMsg.getAttach();
if (attach.startsWith(StrUtil.DELIM_START) && attach.endsWith(StrUtil.DELIM_END)) {
@@ -46,8 +50,6 @@ public class UserChatMsgListener implements ApplicationListener<UserChatMsgEvent
if (attachObj != null && StrUtil.isNotEmpty(attachObj.getUrl())) {
content = attachObj.getUrl();
}
} else {
content = attach;
}
}
Long fromUid = null;