mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
closes #2967
@barisusakli there was a return; if user is offline, don't see any reason why it should be so I removed it, just FYI
This commit is contained in:
@@ -173,16 +173,13 @@ define('forum/users', ['translator'], function(translator) {
|
||||
|
||||
function onUserStatusChange(data) {
|
||||
var section = getActiveSection();
|
||||
|
||||
if ((section.startsWith('online') || section.startsWith('users'))) {
|
||||
updateUser(data);
|
||||
}
|
||||
}
|
||||
|
||||
function updateUser(data) {
|
||||
if (data.status === 'offline') {
|
||||
return;
|
||||
}
|
||||
|
||||
app.updateUserStatus($('#users-container [data-uid="' + data.uid +'"] [component="user/status"]'), data.status);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ SocketUser.deleteAccount = function(socket, data, callback) {
|
||||
return callback(err || new Error('[[error:cant-delete-admin]]'));
|
||||
}
|
||||
|
||||
user.deleteAccount(socket.uid, callback);
|
||||
socket.broadcast.emit('event:user_status_change', {uid: socket.uid, status: 'offline'});
|
||||
user.deleteAccount(socket.uid, callback);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user