fixed array out of bounds in isMuc
This commit is contained in:
parent
aa1665e359
commit
e02ae4cde2
|
@ -485,8 +485,11 @@ public class ContactsActivity extends XmppActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isMuc(Contact contact) {
|
private boolean isMuc(Contact contact) {
|
||||||
String server = contact.getJid().split("@")[1];
|
String[] parts = contact.getJid().split("@");
|
||||||
return getMucServers().contains(server);
|
if (parts.length != 2) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return getMucServers().contains(parts[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startConversation(Contact contact, Account account, boolean muc) {
|
public void startConversation(Contact contact, Account account, boolean muc) {
|
||||||
|
|
Loading…
Reference in New Issue