it.auties.whatsapp.model.signal.message.SignalProtocolMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of whatsappweb4j Show documentation
Show all versions of whatsappweb4j Show documentation
Standalone fully-featured Whatsapp Web API for Java and Kotlin
The newest version!
package it.auties.whatsapp.model.signal.message;
import it.auties.protobuf.base.ProtobufMessage;
import it.auties.whatsapp.util.BytesHelper;
import it.auties.whatsapp.util.Spec;
public sealed interface SignalProtocolMessage extends ProtobufMessage permits SenderKeyMessage, SignalDistributionMessage, SignalMessage, SignalPreKeyMessage {
int version();
byte[] serialized();
default byte serializedVersion() {
return BytesHelper.versionToBytes(version() == 0 ? Spec.Signal.CURRENT_VERSION : version());
}
}