public void chat(View view) {
    ListView list = (ListView) findViewById(R.id.instancesList);
    int index = list.getCheckedItemPosition();
    if (index < 0) {
      MainActivity.showMessage("Select a channel", this);
      return;
    }
    this.instance = instances.get(index);
    ChannelConfig config = new ChannelConfig();
    config.id = this.instance.id;
    config.name = this.instance.name;

    HttpAction action = new HttpFetchAction(this, config, true);
    action.execute();
  }