我想在用户加入房间时向其发送系统欢迎消息。我该怎么办?
socket.on('subscribe',async function(room){
socket.join(room);
//I tried follows with no luck
//socket.broadcast.to(socket.id).emit('welcome', {hello: 'world1' });
//io.in(room).broadcast.to(socket.id).emit('voteCount', r);
谢谢。