removed global room

socket.io already puts everyone into a room named ''
This commit is contained in:
barisusakli
2014-09-05 22:11:21 -04:00
parent 8e86f4b787
commit 0dc780148a
3 changed files with 11 additions and 9 deletions

View File

@@ -66,11 +66,13 @@ SocketMeta.rooms.enter = function(socket, data, callback) {
return callback(new Error('[[error:invalid-data]]'));
}
if (data.leave !== null) {
if (data.leave) {
socket.leave(data.leave);
}
socket.join(data.enter);
if (data.enter) {
socket.join(data.enter);
}
if (data.leave && data.leave !== data.enter && data.leave.indexOf('topic') !== -1) {
module.parent.exports.updateRoomBrowsingText(data.leave);