Merge pull request #2702 from thelounge/astorije/connect-override
Fix bugs with URL overrides in Connect window
This commit is contained in:
commit
c9ba896d9e
@ -176,6 +176,17 @@ function parseOverrideParams(params, data) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// When the network is locked, URL overrides should not affect disabled fields
|
||||
if (data.lockNetwork &&
|
||||
["host", "port", "tls", "rejectUnauthorized"].includes(key)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// When the network is not displayed, its name in the UI is not customizable
|
||||
if (!data.displayNetwork && key === "name") {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (key === "join") {
|
||||
value = value.split(",").map((chan) => {
|
||||
if (!chan.match(/^[#&!+]/)) {
|
||||
|
@ -590,6 +590,7 @@ function getClientConfiguration(network) {
|
||||
} else {
|
||||
// Only send defaults that are visible on the client
|
||||
config.defaults = _.pick(network || Helper.config.defaults, [
|
||||
"name",
|
||||
"nick",
|
||||
"username",
|
||||
"password",
|
||||
|
Loading…
Reference in New Issue
Block a user