We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1d259b commit 58001b2Copy full SHA for 58001b2
server/server.ts
@@ -167,6 +167,11 @@ io.on('connection', (client) => {
167
});
168
169
//-------Socket events for state synchronization in collab room------------------
170
+ client.on('send-chat-message', (roomCode: string, messageData: object) => {
171
+ if (roomCode) {
172
+ io.to(roomCode).emit('new chat message', messageData);
173
+ }
174
+ });
175
client.on('addChildAction', (roomCode: string, childData: object) => {
176
// console.log('child data received on server:', childData);
177
if (roomCode) {
0 commit comments