aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/parser/MessageParser.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-06-25 16:55:47 +0200
committeriNPUTmice <daniel@gultsch.de>2014-06-25 16:55:47 +0200
commitdfbc42ecd795b8e5138f3dc123cdbbf8bf685209 (patch)
treea083c6bb14c3c8624b4e7d65e0f16199e762f599 /src/eu/siacs/conversations/parser/MessageParser.java
parent5d4efe082675052f415c212f89fd3110c56265cf (diff)
some fixes for otr with multiple parties
Diffstat (limited to 'src/eu/siacs/conversations/parser/MessageParser.java')
-rw-r--r--src/eu/siacs/conversations/parser/MessageParser.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/parser/MessageParser.java b/src/eu/siacs/conversations/parser/MessageParser.java
index f0615876..cd10d6c8 100644
--- a/src/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/eu/siacs/conversations/parser/MessageParser.java
@@ -56,7 +56,7 @@ public class MessageParser extends AbstractParser {
String foreignPresence = conversation.getOtrSession()
.getSessionID().getUserID();
if (!foreignPresence.equals(fromParts[1])) {
- conversation.resetOtrSession();
+ conversation.endOtrIfNeeded();
if (properlyAddressed) {
conversation.startOtrSession(
mXmppConnectionService.getApplicationContext(),
@@ -90,6 +90,10 @@ public class MessageParser extends AbstractParser {
finishedMessage.setTime(getTimestamp(packet));
return finishedMessage;
} catch (Exception e) {
+ String receivedId = packet.getId();
+ if (receivedId!=null) {
+ mXmppConnectionService.replyWithError(account,packet);
+ }
conversation.resetOtrSession();
return null;
}