All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.auties.whatsapp.model.message.server.SenderKeyDistributionMessage Maven / Gradle / Ivy

There is a newer version: 3.5.1
Show newest version
package it.auties.whatsapp.model.message.server;

import it.auties.protobuf.base.ProtobufProperty;
import it.auties.whatsapp.model.message.model.MessageType;
import it.auties.whatsapp.model.message.model.ServerMessage;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.extern.jackson.Jacksonized;

import static it.auties.protobuf.base.ProtobufType.BYTES;
import static it.auties.protobuf.base.ProtobufType.STRING;

/**
 * A model class that represents a message sent by WhatsappWeb for security purposes. Whatsapp
 * follows the Signal Standard, for more information about this message visit their
 * documentation
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
@Jacksonized
@Accessors(fluent = true)
public final class SenderKeyDistributionMessage implements ServerMessage {
    /**
     * The jid of the sender
     */
    @ProtobufProperty(index = 1, type = STRING)
    private String groupId;

    /**
     * The sender key
     */
    @ProtobufProperty(index = 2, type = BYTES)
    private byte[] data;

    @Override
    public MessageType type() {
        return MessageType.SENDER_KEY_DISTRIBUTION;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy