mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
Reset config.server.auth when using custom server URL
This commit is contained in:
parent
4df9328be8
commit
77030931cb
1 changed files with 8 additions and 2 deletions
|
@ -175,8 +175,6 @@ export default class App extends Component {
|
|||
* - Default server URL constructed from the current URL location
|
||||
*/
|
||||
handleConfig(config) {
|
||||
this.config = config;
|
||||
|
||||
let connectParams = {};
|
||||
|
||||
if (config.server) {
|
||||
|
@ -200,6 +198,12 @@ export default class App extends Component {
|
|||
let queryParams = parseQueryString();
|
||||
if (queryParams.server) {
|
||||
connectParams.url = queryParams.server;
|
||||
|
||||
// When using a custom server, some configuration options don't
|
||||
// make sense anymore.
|
||||
if (config.server) {
|
||||
config.server.auth = null;
|
||||
}
|
||||
}
|
||||
if (queryParams.nick) {
|
||||
connectParams.nick = queryParams.nick;
|
||||
|
@ -212,6 +216,8 @@ export default class App extends Component {
|
|||
connectParams.autojoin = window.location.hash.split(",");
|
||||
}
|
||||
|
||||
this.config = config;
|
||||
|
||||
this.setState((state) => {
|
||||
return {
|
||||
connectParams: {
|
||||
|
|
Loading…
Reference in a new issue