fixed crashing on unparsed jids
This commit is contained in:
parent
183e31ade1
commit
ab2187dbdf
|
@ -60,12 +60,12 @@ public class MessageParser extends AbstractParser implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private Message parseOtrChat(MessagePacket packet, Account account) {
|
private Message parseOtrChat(MessagePacket packet, Account account) {
|
||||||
boolean properlyAddressed = (!packet.getTo().isBareJid())
|
final Jid to = packet.getTo();
|
||||||
|| (account.countPresences() == 1);
|
|
||||||
final Jid from = packet.getFrom();
|
final Jid from = packet.getFrom();
|
||||||
if (from == null) {
|
if (to == null || from == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
boolean properlyAddressed = !to.isBareJid() || account.countPresences() == 1;
|
||||||
Conversation conversation = mXmppConnectionService
|
Conversation conversation = mXmppConnectionService
|
||||||
.findOrCreateConversation(account, from.toBareJid(), false);
|
.findOrCreateConversation(account, from.toBareJid(), false);
|
||||||
String presence;
|
String presence;
|
||||||
|
|
Loading…
Reference in New Issue