mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Untrusted identity is not always a legacy message content
Closes #5924 Fixes #5922 // FREEBIE
This commit is contained in:
parent
770026d4ee
commit
cb23e3a930
@ -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.<SignalServiceGroup>absent(), 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user