Read auto-join channels from browser URL hash

This is easier to type than trying to escape the # in ?channels=#XXX.
This commit is contained in:
Simon Ser 2021-05-26 22:57:21 +02:00
parent 7c81fa6e8c
commit 17cd38f0b9

View file

@ -252,6 +252,10 @@ export default class App extends Component {
connectParams.autojoin = queryParams.channels.split(",");
}
if (window.location.hash) {
connectParams.autojoin = window.location.hash.split(",");
}
this.setState((state) => {
return { connectParams: { ...state.connectParams, ...connectParams } };
});