aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorAndreas Straub <andy@strb.org>2015-06-29 14:30:23 +0200
committerAndreas Straub <andy@strb.org>2015-07-05 17:27:29 +0200
commitc1116b606635f8ee714de8f897c65758c8f0b4ef (patch)
tree220fdceb07c85ea6062c3da97d90156f707817a3 /src/main/java
parentab2f85d2e82f86b7c3eaeb3c8c784e9775ec6efa (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/main/java')
-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()) {