aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Straub <andy@strb.org>2015-06-29 14:30:23 +0200
committerAndreas Straub <andy@strb.org>2015-07-19 21:32:26 +0200
commit992cf5652e37f075bfcd9ed4f862fe407f3404dc (patch)
treef3c241a215414ccc83fb515a23d2076342253c78 /src
parent1b0596d57473f7aafa633ed2d5f3b3610a653a51 (diff)
When receiving, add mock session if none exists
We need a session object in order to build a session from a PreKeyWhisperMessage, so add an empty one when none exists on receiving a message. Warning: this will break right now if the session can not be constructed from the received message.There will be an invalid session which will break if we try to send using it.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
index 54394dd2..6a493e54 100644
--- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
+++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
@@ -904,7 +904,7 @@ public class AxolotlService {
Log.d(Config.LOGTAG, "No axolotl session found while parsing received message " + message);
// TODO: handle this properly
session = new XmppAxolotlSession(axolotlStore, senderAddress);
-
+ sessions.put(senderAddress,session);
}
for(XmppAxolotlMessage.XmppAxolotlMessageHeader header : message.getHeaders()) {