mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-17 14:25:12 -05:00
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) {
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user