diff --git a/index.js b/index.js index 33833385..bebcd495 100644 --- a/index.js +++ b/index.js @@ -114,20 +114,20 @@ io.on('connection', function (client) { */ - client.emit('broad', "
" +/* "" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); - client.to(data.room).emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); + client.emit('broad', "
" +/* "" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); + client.to(data.room).emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); client.to(data.room).emit('broadNotif', data); } else /* if (data.type == 'image') */ { - client.emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); - client.to(data.room).emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); + client.emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); + client.to(data.room).emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); client.to(data.room).emit('broadNotif', data); } /* else if (data.type == 'video') { - client.emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); - /*client.to(data.room).emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); + client.emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); + /*client.to(data.room).emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); /*client.to(data.room).emit('broadNotif', data); } else if (data.type == 'audio') { - client.emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); - client.to(data.room).emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); + client.emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); + client.to(data.room).emit('broad', "
" +/* "" + data.user.disName + " (" + data.user.genName + "): [at ]
" + striptags(md.render(striptags(data.text)), ['strong', 'i', 'em', 'code', 'a', 'div', 'sub', 'sup', 's']) + "
"); client.to(data.room).emit('broadNotif', data); } */