聊天室显示自己的消息
This commit is contained in:
parent
b14aaa6ec3
commit
273633bda4
@ -145,6 +145,7 @@ const chat = new Chat({
|
||||
onsend: async (text, list) => {
|
||||
console.log('发送消息', text)
|
||||
clientList.send('chat', JSON.stringify({ type: 'message', text }))
|
||||
chat.add({ name, text, time: new Date().toLocaleTimeString() })
|
||||
console.log('发送结束')
|
||||
},
|
||||
onexit: async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user