Some things.
This commit is contained in:
@@ -12,7 +12,14 @@ ws.onmessage = (event) => {
|
||||
function sendMessage() {
|
||||
const text = input.value;
|
||||
if (text.trim()) {
|
||||
ws.send(text);
|
||||
ws.send(
|
||||
JSON.stringify({
|
||||
type: "send",
|
||||
data: {
|
||||
content: text,
|
||||
},
|
||||
}),
|
||||
);
|
||||
input.value = "";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user