mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 22:10:22 +00:00
Fix login
This commit is contained in:
parent
66785be200
commit
b52b860167
2 changed files with 15 additions and 18 deletions
|
@ -40,7 +40,6 @@ $(function() {
|
|||
};
|
||||
}
|
||||
|
||||
// Request notification permissions if we don't already have it
|
||||
if (Notification.permission !== "granted") {
|
||||
Notification.requestPermission();
|
||||
}
|
||||
|
@ -100,24 +99,22 @@ $(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;
|
||||
});
|
||||
chat.html(
|
||||
render("chat", {
|
||||
channels: channels
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
sidebar.find(".networks").html(
|
||||
render("network", {
|
||||
networks: data.networks
|
||||
})
|
||||
);
|
||||
|
||||
var channels = $.map(data.networks, function(n) {
|
||||
return n.channels;
|
||||
});
|
||||
chat.html(
|
||||
render("chat", {
|
||||
channels: channels
|
||||
})
|
||||
);
|
||||
|
||||
sidebar.find(".empty").hide();
|
||||
$("body").removeClass("signed-out");
|
||||
$("#sign-in").detach();
|
||||
|
|
|
@ -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 a new issue