mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 22:45:46 +01:00
fix room enter
This commit is contained in:
@@ -184,6 +184,7 @@ app.cacheBuster = null;
|
|||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
app.alertError(err.message);
|
app.alertError(err.message);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
app.currentRoom = room;
|
app.currentRoom = room;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ SocketMeta.buildTitle = function(socket, text, callback) {
|
|||||||
|
|
||||||
SocketMeta.rooms.enter = function(socket, data, callback) {
|
SocketMeta.rooms.enter = function(socket, data, callback) {
|
||||||
if (!socket.uid) {
|
if (!socket.uid) {
|
||||||
return;
|
return callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
@@ -83,6 +83,7 @@ SocketMeta.rooms.enter = function(socket, data, callback) {
|
|||||||
websockets.in(data.enter).emit('event:user_enter', data);
|
websockets.in(data.enter).emit('event:user_enter', data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
callback();
|
||||||
};
|
};
|
||||||
|
|
||||||
SocketMeta.rooms.getAll = function(socket, data, callback) {
|
SocketMeta.rooms.getAll = function(socket, data, callback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user