package org.asamk.signal.manager.actions;
import org.asamk.signal.manager.groups.GroupId;
-import org.asamk.signal.manager.jobs.Context;
+import org.asamk.signal.manager.helper.Context;
import org.asamk.signal.manager.storage.recipients.RecipientId;
import org.signal.libsignal.metadata.ProtocolException;
import org.whispersystems.libsignal.protocol.CiphertextMessage;
}
private static int envelopeTypeToCiphertextMessageType(int envelopeType) {
- switch (envelopeType) {
- case SignalServiceProtos.Envelope.Type.PREKEY_BUNDLE_VALUE:
- return CiphertextMessage.PREKEY_TYPE;
- case SignalServiceProtos.Envelope.Type.UNIDENTIFIED_SENDER_VALUE:
- return CiphertextMessage.SENDERKEY_TYPE;
- case SignalServiceProtos.Envelope.Type.PLAINTEXT_CONTENT_VALUE:
- return CiphertextMessage.PLAINTEXT_CONTENT_TYPE;
- case SignalServiceProtos.Envelope.Type.CIPHERTEXT_VALUE:
- default:
- return CiphertextMessage.WHISPER_TYPE;
- }
+ return switch (envelopeType) {
+ case SignalServiceProtos.Envelope.Type.PREKEY_BUNDLE_VALUE -> CiphertextMessage.PREKEY_TYPE;
+ case SignalServiceProtos.Envelope.Type.UNIDENTIFIED_SENDER_VALUE -> CiphertextMessage.SENDERKEY_TYPE;
+ case SignalServiceProtos.Envelope.Type.PLAINTEXT_CONTENT_VALUE -> CiphertextMessage.PLAINTEXT_CONTENT_TYPE;
+ default -> CiphertextMessage.WHISPER_TYPE;
+ };
}
@Override