使用正确的用户名

This commit is contained in:
2023-10-21 19:31:21 +08:00
parent 65cb34f713
commit da2c1ef8c8
2 changed files with 2 additions and 2 deletions

View File

@ -215,7 +215,7 @@ export default class Chat {
await set(data.id, data, this.store)
}
发送消息(text) {
const name = '我'
const name = localStorage.getItem('username')
const id = window.crypto.randomUUID()
const time = new Date().toLocaleString()
const type = 'text'

View File

@ -174,7 +174,7 @@ clientList.setChannel('chat', {
return
}
if (data.type === 'list') {
console.log(client.name, `同步来 ${data.list.length} 条消息`)
console.log(client.name, `同步来 ${data.list.length} 条消息`, data.list)
await chat.合并消息列表(data.list)
return
}