message: prevent creation of multiple accounts with the same jid
diff: @@ -97,7 +97,9 @@ export default class Client {
  public static createAccount() {
  let account;
  - if (arguments.length === 4) {
  + if (Client.getAccount(arguments[1])) {
  + return Promise.reject('Account with this jid already exists.');
  + } else if (arguments.length === 4) {
  account = new Account(arguments[0], arguments[1], arguments[2], arguments[3]);
  } else if (arguments.length === 3) {
  account = new Account(arguments[0], arguments[1], arguments[2]);
  @@ -105,8 +107,6 @@ export default class Client {
  return Promise.reject('Wrong number of arguments');
  }
  - //@TODO prevent creation of multiple accounts with the same jid
  -
  Client.addAccount(account);
  return Promise.resolve(account);
  