I'd upgraded my socket.io version from 2 to 3 but the below line:
io.sockets.in(room).emit(bag.message.eventType, message)
breaks with this error:
Cannot read property 'EVENT' of undefined at Namespace.emit (/node_modules/socket.io/dist/namespace.js:170:49)
Can someone explain what syntax should go with socket.io@3 for the above code? TIA