fixed array out of bounds in isMuc

This commit is contained in:
iNPUTmice 2014-07-03 11:32:54 +02:00
parent aa1665e359
commit e02ae4cde2

View file

@ -485,8 +485,11 @@ public class ContactsActivity extends XmppActivity {
}
private boolean isMuc(Contact contact) {
String server = contact.getJid().split("@")[1];
return getMucServers().contains(server);
String[] parts = contact.getJid().split("@");
if (parts.length != 2) {
return false;
}
return getMucServers().contains(parts[1]);
}
public void startConversation(Contact contact, Account account, boolean muc) {