使用正确的用户名
This commit is contained in:
parent
65cb34f713
commit
da2c1ef8c8
@ -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'
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user