Skip to content

Commit

Permalink
Adding AI option to stickers
Browse files Browse the repository at this point in the history
  • Loading branch information
Darker935 authored May 18, 2024
1 parent 0873de8 commit b83f7cd
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ public final class StickerMessage extends ExtendedMediaMessage<StickerMessage> i
@ProtobufProperty(index = 19, type = ProtobufType.BOOL)
private final boolean avatar;

@ProtobufProperty(index = 20, type = ProtobufType.BOOL)
private final boolean ai;

@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
public StickerMessage(String mediaUrl, byte[] mediaSha256, byte[] mediaEncryptedSha256, byte[] mediaKey, String mimetype, Integer height, Integer width, String mediaDirectPath, Long mediaSize, Long mediaKeyTimestampSeconds, Integer firstFrameLength, byte[] firstFrameSidecar, boolean animated, byte[] thumbnail, ContextInfo contextInfo, Long stickerSentTimestamp, boolean avatar) {
public StickerMessage(String mediaUrl, byte[] mediaSha256, byte[] mediaEncryptedSha256, byte[] mediaKey, String mimetype, Integer height, Integer width, String mediaDirectPath, Long mediaSize, Long mediaKeyTimestampSeconds, Integer firstFrameLength, byte[] firstFrameSidecar, boolean animated, byte[] thumbnail, ContextInfo contextInfo, Long stickerSentTimestamp, boolean avatar, boolean ai) {
this.mediaUrl = mediaUrl;
this.mediaSha256 = mediaSha256;
this.mediaEncryptedSha256 = mediaEncryptedSha256;
Expand All @@ -96,6 +99,7 @@ public StickerMessage(String mediaUrl, byte[] mediaSha256, byte[] mediaEncrypted
this.contextInfo = contextInfo;
this.stickerSentTimestamp = stickerSentTimestamp;
this.avatar = avatar;
this.ai = ai;
}

@ProtobufBuilder(className = "SimpleStickerMessageBuilder")
Expand Down Expand Up @@ -125,6 +129,10 @@ public boolean avatar() {
return avatar;
}

public boolean ai() {
return ai;
}

@Override
public Optional<String> mediaUrl() {
return Optional.ofNullable(mediaUrl);
Expand Down Expand Up @@ -242,4 +250,4 @@ public StickerMessage setContextInfo(ContextInfo contextInfo) {
this.contextInfo = contextInfo;
return this;
}
}
}

0 comments on commit b83f7cd

Please sign in to comment.