mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 08:25:46 +01:00
socket rooms! and almost finished rep (socket updates) except for one small bug where current_user isnt being pulled
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
var socket,
|
||||
config,
|
||||
app = {},
|
||||
|
||||
current_room,
|
||||
API_URL = null;
|
||||
|
||||
// todo: cleanup,etc
|
||||
@@ -173,6 +173,12 @@ var socket,
|
||||
};
|
||||
|
||||
jQuery('document').ready(function() {
|
||||
if (current_room != 'global') {
|
||||
socket.emit('event:enter_room', 'global');
|
||||
current_room = 'global';
|
||||
}
|
||||
|
||||
|
||||
// On menu click, change "active" state
|
||||
var menuEl = document.querySelector('.nav'),
|
||||
liEls = menuEl.querySelectorAll('li'),
|
||||
|
||||
Reference in New Issue
Block a user