From 248e76ff469585ecd339ef79d95ad51eb6855da0 Mon Sep 17 00:00:00 2001 From: vanitasvitae Date: Fri, 30 Jun 2017 14:30:19 +0200 Subject: [PATCH] Fix receiving OMEMO MUC messages The method OmemoManager.getSender() was faulty and returned null for MUC occupants, which lead to NPEs when receiving MUC messages with OMEMO. --- .../java/org/jivesoftware/smackx/omemo/OmemoService.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 17332669b..d3b6957c1 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 @@ -39,7 +39,6 @@ import java.util.Random; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; - import javax.crypto.BadPaddingException; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; @@ -51,7 +50,6 @@ import org.jivesoftware.smack.filter.StanzaFilter; import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smack.packet.XMPPError; - import org.jivesoftware.smackx.carbons.CarbonCopyReceivedListener; import org.jivesoftware.smackx.carbons.CarbonManager; import org.jivesoftware.smackx.carbons.packet.CarbonExtension; @@ -88,6 +86,7 @@ import org.jivesoftware.smackx.pubsub.PubSubManager; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.jxmpp.jid.BareJid; +import org.jxmpp.jid.Jid; /** * This class contains OMEMO related logic and registers listeners etc. @@ -1177,7 +1176,7 @@ public abstract class OmemoService