diff --git a/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java b/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java index b4c34d834e..99bbff1d1c 100644 --- a/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java +++ b/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java @@ -604,9 +604,10 @@ public class PushDecryptJob extends ContextJob { EncryptingSmsDatabase database = DatabaseFactory.getEncryptingSmsDatabase(context); Recipients recipients = RecipientFactory.getRecipientsFromString(context, envelope.getSource(), false); long recipientId = recipients.getPrimaryRecipient().getRecipientId(); - PreKeySignalMessage whisperMessage = new PreKeySignalMessage(envelope.getLegacyMessage()); + byte[] ciphertext = envelope.hasLegacyMessage() ? envelope.getLegacyMessage() : envelope.getContent(); + PreKeySignalMessage whisperMessage = new PreKeySignalMessage(ciphertext); IdentityKey identityKey = whisperMessage.getIdentityKey(); - String encoded = Base64.encodeBytes(envelope.getLegacyMessage()); + String encoded = Base64.encodeBytes(ciphertext); IncomingTextMessage textMessage = new IncomingTextMessage(envelope.getSource(), envelope.getSourceDevice(), envelope.getTimestamp(), encoded, Optional.absent(), 0);