|
@@ -136,18 +136,7 @@ export function useDataSource () {
|
|
const resp = await getMessageSync(query)
|
|
const resp = await getMessageSync(query)
|
|
const messageList = resp && resp["messages"]
|
|
const messageList = resp && resp["messages"]
|
|
if (messageList) {
|
|
if (messageList) {
|
|
- // console.log('messageList', messageList)
|
|
|
|
messageList.forEach((msg) => {
|
|
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))
|
|
msg.payload = JSON.parse(Base64.decode(msg.payload))
|
|
if (contentType[msg.payload.type]) {
|
|
if (contentType[msg.payload.type]) {
|
|
msg.payload.content = JSON.parse(msg.payload.content ?? '{}')
|
|
msg.payload.content = JSON.parse(msg.payload.content ?? '{}')
|
|
@@ -155,7 +144,6 @@ export function useDataSource () {
|
|
resultMessages.push(msg)
|
|
resultMessages.push(msg)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- // console.log(resultMessages)
|
|
|
|
const more = resp.more === 1
|
|
const more = resp.more === 1
|
|
return {
|
|
return {
|
|
more,
|
|
more,
|