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;
|
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") {
|
if (key === "join") {
|
||||||
value = value.split(",").map((chan) => {
|
value = value.split(",").map((chan) => {
|
||||||
if (!chan.match(/^[#&!+]/)) {
|
if (!chan.match(/^[#&!+]/)) {
|
||||||
|
@ -590,6 +590,7 @@ function getClientConfiguration(network) {
|
|||||||
} else {
|
} else {
|
||||||
// Only send defaults that are visible on the client
|
// Only send defaults that are visible on the client
|
||||||
config.defaults = _.pick(network || Helper.config.defaults, [
|
config.defaults = _.pick(network || Helper.config.defaults, [
|
||||||
|
"name",
|
||||||
"nick",
|
"nick",
|
||||||
"username",
|
"username",
|
||||||
"password",
|
"password",
|
||||||
|
Loading…
Reference in New Issue
Block a user