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:
parent
7c81fa6e8c
commit
17cd38f0b9
1 changed files with 4 additions and 0 deletions
|
@ -252,6 +252,10 @@ export default class App extends Component {
|
||||||
connectParams.autojoin = queryParams.channels.split(",");
|
connectParams.autojoin = queryParams.channels.split(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (window.location.hash) {
|
||||||
|
connectParams.autojoin = window.location.hash.split(",");
|
||||||
|
}
|
||||||
|
|
||||||
this.setState((state) => {
|
this.setState((state) => {
|
||||||
return { connectParams: { ...state.connectParams, ...connectParams } };
|
return { connectParams: { ...state.connectParams, ...connectParams } };
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue