refactor: 移除获取单聊联系人信息逻辑以简化消息处理流程

由于单聊联系人信息在当前消息处理流程中未使用,移除相关代码以减少不必要的网络请求和逻辑复杂度,提高代码可维护性。
This commit is contained in:
2026-03-24 19:20:44 +08:00
parent 10fce2349d
commit a097854394

View File

@@ -280,16 +280,6 @@ object WeworkLoopImpl {
}
messageList.removeIf { it.textType == WeworkMessageBean.TEXT_TYPE_IMAGE }
}
// 获取单聊联系人详细信息
var contactInfo: WeworkMessageBean.Friend? = null
if (roomType == WeworkMessageBean.ROOM_TYPE_EXTERNAL_CONTACT
|| roomType == WeworkMessageBean.ROOM_TYPE_INTERNAL_CONTACT) {
val friendName = titleList.firstOrNull() ?: ""
if (friendName.isNotEmpty()) {
contactInfo = getChatContactInfo(friendName)
}
}
val messageBean = WeworkMessageBean(
null, null,
WeworkMessageBean.TYPE_RECEIVE_MESSAGE_LIST,
@@ -298,7 +288,6 @@ object WeworkLoopImpl {
messageList,
null
)
messageBean.contact = contactInfo
WeworkController.weworkService.webSocketManager.send(messageBean)
//推测是否回复并在房间等待指令
if (needInfer) {