Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Darker935 authored Jun 26, 2024
1 parent d8a7942 commit b3eb4e2
Showing 1 changed file with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package it.auties.whatsapp.model.message.standard;

import it.auties.protobuf.annotation.ProtobufMessageName;
import it.auties.protobuf.annotation.ProtobufProperty;
import it.auties.protobuf.model.ProtobufEnum;
import it.auties.protobuf.model.ProtobufType;
import it.auties.whatsapp.model.message.model.*;


@ProtobufMessageName("Message.PinInChatMessage")
public record PinInChatMessage(
@ProtobufProperty(index = 1, type = ProtobufType.OBJECT)
ChatMessageKey key,
@ProtobufProperty(index = 2, type = ProtobufType.OBJECT)
Type pinType,
@ProtobufProperty(index = 3, type = ProtobufType.INT64)
long senderTimestampMilliseconds
) implements Message {
@Override
public MessageType type() { return MessageType.PIN_IN_CHAT; }

@Override
public MessageCategory category() { return MessageCategory.STANDARD; }

@ProtobufMessageName("Message.PinInChatMessage.Type")
public enum Type implements ProtobufEnum {
UNKNOWN_TYPE(0),
PIN_FOR_ALL(1),
UNPIN_FOR_ALL(2);

final int index;

Type(int index) { this.index = index; }

public int index() { return index; }
}
}

0 comments on commit b3eb4e2

Please sign in to comment.