mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 14:35:47 +01:00
send less data when leaving rooms
This commit is contained in:
@@ -143,14 +143,25 @@ app.cacheBuster = null;
|
||||
status: app.user.status
|
||||
}, function(err) {
|
||||
if (err) {
|
||||
app.alertError(err.message);
|
||||
return;
|
||||
return app.alertError(err.message);
|
||||
}
|
||||
app.currentRoom = room;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
app.leaveCurrentRoom = function() {
|
||||
if (!socket) {
|
||||
return;
|
||||
}
|
||||
socket.emit('meta.rooms.leaveCurrent', function(err) {
|
||||
if (err) {
|
||||
return app.alertError(err.message);
|
||||
}
|
||||
app.currentRoom = '';
|
||||
});
|
||||
}
|
||||
|
||||
function highlightNavigationLink() {
|
||||
var path = window.location.pathname;
|
||||
$('#main-nav li').removeClass('active');
|
||||
|
||||
Reference in New Issue
Block a user