mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 20:52:21 -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