|
@@ -102,7 +102,6 @@ export function useDataSource () {
|
|
|
}
|
|
|
const resultConversations = []
|
|
|
const resp = await getConversationSync(query)
|
|
|
- // console.log(resp)
|
|
|
const conversationList = resp
|
|
|
if (conversationList) {
|
|
|
conversationList.forEach(conversation => {
|
|
@@ -137,9 +136,18 @@ export function useDataSource () {
|
|
|
const resp = await getMessageSync(query)
|
|
|
const messageList = resp && resp["messages"]
|
|
|
if (messageList) {
|
|
|
+ // console.log('messageList', messageList)
|
|
|
messageList.forEach((msg) => {
|
|
|
// const message = Convert.toMessage(msg);
|
|
|
// msg.channel = new Channel(msg.channel_id, msg.channel_type)
|
|
|
+ if (channel.channelID === 'system') {
|
|
|
+ msg.payload = {
|
|
|
+ type: -1,
|
|
|
+ content: Base64.decode(msg.payload)
|
|
|
+ }
|
|
|
+ resultMessages.push(msg)
|
|
|
+ return
|
|
|
+ }
|
|
|
msg.payload = JSON.parse(Base64.decode(msg.payload))
|
|
|
if (contentType[msg.payload.type]) {
|
|
|
msg.payload.content = JSON.parse(msg.payload.content ?? '{}')
|
|
@@ -383,6 +391,7 @@ export function send (text, _channel, type) {
|
|
|
let _text
|
|
|
if (contentType[type]) {
|
|
|
_text = new contentType[type](text)
|
|
|
+ console.log(_text)
|
|
|
WKSDK.shared().chatManager.send(_text, _channel)
|
|
|
return
|
|
|
}
|