mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-20 14:54:09 +00:00
Support encrypted transport, properly handle multiple recipients.
1) Add encryption support for the transport layer. This obscures metadata from the push messaging provider. 2) Better support the direction multiple destination messages is headed (one unique message per recipient).
This commit is contained in:
@@ -42,6 +42,7 @@ import org.whispersystems.textsecure.crypto.InvalidVersionException;
|
||||
import org.whispersystems.textsecure.crypto.MasterSecret;
|
||||
import org.whispersystems.textsecure.crypto.protocol.PreKeyBundleMessage;
|
||||
import org.whispersystems.textsecure.push.OutgoingPushMessage;
|
||||
import org.whispersystems.textsecure.push.PushMessage;
|
||||
import org.whispersystems.textsecure.storage.InvalidKeyIdException;
|
||||
|
||||
import java.util.List;
|
||||
@@ -62,11 +63,11 @@ public class SmsReceiver {
|
||||
IncomingTextMessage message = messages.get(0);
|
||||
|
||||
switch (pushType) {
|
||||
case OutgoingPushMessage.TYPE_MESSAGE_CIPHERTEXT:
|
||||
case PushMessage.TYPE_MESSAGE_CIPHERTEXT:
|
||||
return new IncomingEncryptedMessage(message, message.getMessageBody());
|
||||
case OutgoingPushMessage.TYPE_MESSAGE_PREKEY_BUNDLE:
|
||||
case PushMessage.TYPE_MESSAGE_PREKEY_BUNDLE:
|
||||
return new IncomingPreKeyBundleMessage(message, message.getMessageBody());
|
||||
case OutgoingPushMessage.TYPE_MESSAGE_KEY_EXCHANGE:
|
||||
case PushMessage.TYPE_MESSAGE_KEY_EXCHANGE:
|
||||
return new IncomingKeyExchangeMessage(message, message.getMessageBody());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user