aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/parser
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2016-04-05 23:24:49 +0200
committerlookshe <github@lookshe.org>2016-04-05 23:24:49 +0200
commitd6a076e11281d4c3fb6b9504fe99d799b04ebbbb (patch)
tree7cbbe209ed0a883bcf29389d91979974444447c1 /src/main/java/eu/siacs/conversations/parser
parentbfb3cb844578d06fad9aade3a7576ee44d785f70 (diff)
parent5eedce91f9d92e5139f13fddb57314570f42b9ad (diff)
Merge tag '1.11.3' into trz/rebase
Diffstat (limited to 'src/main/java/eu/siacs/conversations/parser')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index 89d84cb2..3354c2d7 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -16,6 +16,7 @@ import de.thedevstack.android.logcat.Logging;
import de.thedevstack.conversationsplus.ConversationsPlusPreferences;
import de.thedevstack.conversationsplus.utils.AvatarUtil;
import eu.siacs.conversations.Config;
+import eu.siacs.conversations.crypto.OtrService;
import eu.siacs.conversations.crypto.axolotl.AxolotlService;
import eu.siacs.conversations.crypto.axolotl.AxolotlService;
import eu.siacs.conversations.crypto.axolotl.AxolotlServiceImpl;
@@ -103,8 +104,11 @@ public class MessageParser extends AbstractParser implements
conversation.setSymmetricKey(CryptoHelper.hexToBytes(key));
return null;
}
+ final OtrService otrService = conversation.getAccount().getOtrService();
Message finishedMessage = new Message(conversation, body, Message.ENCRYPTION_OTR, Message.STATUS_RECEIVED);
+ finishedMessage.setFingerprint(otrService.getFingerprint(otrSession.getRemotePublicKey()));
conversation.setLastReceivedOtrMessageId(null);
+
return finishedMessage;
} catch (Exception e) {
conversation.resetOtrSession();
@@ -119,7 +123,7 @@ public class MessageParser extends AbstractParser implements
XmppAxolotlMessage.XmppAxolotlPlaintextMessage plaintextMessage = service.processReceivingPayloadMessage(xmppAxolotlMessage);
if(plaintextMessage != null) {
finishedMessage = new Message(conversation, plaintextMessage.getPlaintext(), Message.ENCRYPTION_AXOLOTL, status);
- finishedMessage.setAxolotlFingerprint(plaintextMessage.getFingerprint());
+ finishedMessage.setFingerprint(plaintextMessage.getFingerprint());
Logging.d(Config.LOGTAG, AxolotlServiceImpl.getLogprefix(finishedMessage.getConversation().getAccount())+" Received Message with session fingerprint: "+plaintextMessage.getFingerprint());
}