Add Client.join, show join errors in popup
This commit is contained in:
parent
fc8aa30756
commit
05f7c6e9fe
3 changed files with 36 additions and 2 deletions
|
@ -318,7 +318,7 @@ export default class App extends Component {
|
|||
}
|
||||
|
||||
showError(msg) {
|
||||
this.setState({ error: msg });
|
||||
this.setState({ error: String(msg) });
|
||||
lastErrorID++;
|
||||
return lastErrorID;
|
||||
}
|
||||
|
@ -1119,7 +1119,9 @@ export default class App extends Component {
|
|||
this.switchBuffer({ server: serverID });
|
||||
} else if (client.isChannel(target)) {
|
||||
this.switchToChannel = target;
|
||||
client.send({ command: "JOIN", params: [target] });
|
||||
client.join(target).catch((err) => {
|
||||
this.showError(err);
|
||||
});
|
||||
} else {
|
||||
this.whoUserBuffer(target, serverID);
|
||||
this.createBuffer(serverID, target);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue