aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index cd4c6401a..e9d491b5f 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -60,12 +60,12 @@ public class MessageParser extends AbstractParser implements
}
private Message parseOtrChat(MessagePacket packet, Account account) {
- boolean properlyAddressed = (!packet.getTo().isBareJid())
- || (account.countPresences() == 1);
- final Jid from = packet.getFrom();
- if (from == null) {
+ final Jid to = packet.getTo();
+ final Jid from = packet.getFrom();
+ if (to == null || from == null) {
return null;
}
+ boolean properlyAddressed = !to.isBareJid() || account.countPresences() == 1;
Conversation conversation = mXmppConnectionService
.findOrCreateConversation(account, from.toBareJid(), false);
String presence;