修复已知问题
This commit is contained in:
@@ -380,19 +380,25 @@
|
||||
|
||||
/** 是否最开始创建群聊 */
|
||||
const isFirstCreateGroup = (item: IConversationModel) => {
|
||||
// 打印
|
||||
if (item.type === 'GROUP' && item?.lastMessage?.payload?.data) {
|
||||
const data = JSON.parse(item?.lastMessage?.payload?.data)
|
||||
return data.content === 'Create Group'
|
||||
? `${item.getLastMessage('text')?.split(':')[0]}:创建群聊`
|
||||
: ''
|
||||
}
|
||||
// if (item.type === 'GROUP' && item?.lastMessage?.payload?.data) {
|
||||
// const data = JSON.parse(item?.lastMessage?.payload?.data)
|
||||
// return data.content === 'Create Group'
|
||||
// ? `${item.getLastMessage('text')?.split(':')[0]}:创建群聊`
|
||||
// : ''
|
||||
// }
|
||||
if (item?.lastMessage?.payload?.data) {
|
||||
const data = JSON.parse(item?.lastMessage?.payload?.data)
|
||||
const text = item.getLastMessage('text')?.split(':')
|
||||
const isText = text && text.length > 1
|
||||
if (data.businessID === CHAT_MSG_CUSTOM_TYPE.GOODS) {
|
||||
console.log(item, '==2222222=')
|
||||
|
||||
return `自定义数据--`
|
||||
if (isText) {
|
||||
return `${text[0]}:[商品信息] ${data.title}`
|
||||
} else {
|
||||
return `[商品信息]:${data.title}`
|
||||
}
|
||||
}
|
||||
if (data.content === 'Create Group' && item.type === 'GROUP') {
|
||||
return `${item.getLastMessage('text')?.split(':')[0]}:创建群聊`
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user