aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities/Message.java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-12-04 21:14:53 +0100
committerChristian Schneppe <christian@pix-art.de>2018-12-04 21:14:53 +0100
commit72a6e378646f0d42cce97616bd2f01b84870049c (patch)
tree6625d3d2d08dfa0dc8f13d53452ed5e8dacd08fa /src/main/java/de/pixart/messenger/entities/Message.java
parent50dbd4077f825bb6e594d652745cd5461db3a9df (diff)
implement self healing omemo
after receiving a SignalMessage that can’t be decrypted because of broken sessions Conversations will attempt to grab a new pre key bundle and send a new PreKeySignalMessage wrapped in a key transport message.
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities/Message.java')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Message.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Message.java b/src/main/java/de/pixart/messenger/entities/Message.java
index 6d11d54d3..abeda3ad3 100644
--- a/src/main/java/de/pixart/messenger/entities/Message.java
+++ b/src/main/java/de/pixart/messenger/entities/Message.java
@@ -45,6 +45,7 @@ public class Message extends AbstractEntity {
public static final int ENCRYPTION_DECRYPTION_FAILED = 4;
public static final int ENCRYPTION_AXOLOTL = 5;
public static final int ENCRYPTION_AXOLOTL_NOT_FOR_THIS_DEVICE = 6;
+ public static final int ENCRYPTION_AXOLOTL_FAILED = 7;
public static final int TYPE_TEXT = 0;
public static final int TYPE_IMAGE = 1;
@@ -913,7 +914,7 @@ public class Message extends AbstractEntity {
if (encryption == ENCRYPTION_DECRYPTED || encryption == ENCRYPTION_DECRYPTION_FAILED) {
return ENCRYPTION_PGP;
}
- if (encryption == ENCRYPTION_AXOLOTL_NOT_FOR_THIS_DEVICE) {
+ if (encryption == ENCRYPTION_AXOLOTL_NOT_FOR_THIS_DEVICE || encryption == ENCRYPTION_AXOLOTL_FAILED) {
return ENCRYPTION_AXOLOTL;
}
return encryption;