Fix login
This commit is contained in:
parent
66785be200
commit
b52b860167
@ -40,7 +40,6 @@ $(function() {
|
||||
};
|
||||
}
|
||||
|
||||
// Request notification permissions if we don't already have it
|
||||
if (Notification.permission !== "granted") {
|
||||
Notification.requestPermission();
|
||||
}
|
||||
@ -100,15 +99,12 @@ $(function() {
|
||||
socket.on("init", function(data) {
|
||||
if (data.networks.length === 0) {
|
||||
$("#footer").find(".connect").trigger("click");
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
sidebar.find(".networks").html(
|
||||
render("network", {
|
||||
networks: data.networks
|
||||
})
|
||||
);
|
||||
|
||||
var channels = $.map(data.networks, function(n) {
|
||||
return n.channels;
|
||||
});
|
||||
@ -117,6 +113,7 @@ $(function() {
|
||||
channels: channels
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
sidebar.find(".empty").hide();
|
||||
$("body").removeClass("signed-out");
|
||||
|
@ -101,7 +101,7 @@ function auth(data) {
|
||||
var success = false;
|
||||
_.each(manager.clients, function(client) {
|
||||
if (client.config.user == data.user) {
|
||||
if (bcrypt.compareSync(data.password, client.config.password)) {
|
||||
if (bcrypt.compareSync(data.password || "", client.config.password)) {
|
||||
init(socket, client);
|
||||
success = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user