upd
This commit is contained in:
@@ -81,6 +81,13 @@ io.on("connection", async (socket) => {
|
||||
io.to(roomId).emit("update", updatedRoomUsers);
|
||||
});
|
||||
|
||||
socket.on("message", (text) => {
|
||||
io.to(roomId).emit("message", {
|
||||
userId: socket.handshake.auth.user.id,
|
||||
text,
|
||||
});
|
||||
});
|
||||
|
||||
socket.on("disconnect", async () => {
|
||||
const sockets = await io.in(roomId).fetchSockets();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user