From e5cdd89edc4f085d227a11719e0333b8ed07754c Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Thu, 4 Jan 2018 15:15:43 +0100 Subject: [PATCH] Ignore stale devices when encrypting --- .../smackx/omemo/OmemoService.java | 17 +++++++- .../exceptions/StaleDeviceException.java | 41 +++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/StaleDeviceException.java diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java index 0e39e0dc9..8b0231878 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java @@ -53,6 +53,7 @@ import org.jivesoftware.smackx.omemo.exceptions.CannotEstablishOmemoSessionExcep import org.jivesoftware.smackx.omemo.exceptions.CorruptedOmemoKeyException; import org.jivesoftware.smackx.omemo.exceptions.CryptoFailedException; import org.jivesoftware.smackx.omemo.exceptions.NoIdentityKeyException; +import org.jivesoftware.smackx.omemo.exceptions.StaleDeviceException; import org.jivesoftware.smackx.omemo.exceptions.UndecidedOmemoIdentityException; import org.jivesoftware.smackx.omemo.exceptions.UntrustedOmemoIdentityException; import org.jivesoftware.smackx.omemo.internal.OmemoCachedDeviceList; @@ -384,6 +385,19 @@ public abstract class OmemoService