diff --git a/src/main/java/it/auties/whatsapp/api/Whatsapp.java b/src/main/java/it/auties/whatsapp/api/Whatsapp.java index adefa15f..c8fca3a2 100644 --- a/src/main/java/it/auties/whatsapp/api/Whatsapp.java +++ b/src/main/java/it/auties/whatsapp/api/Whatsapp.java @@ -34,10 +34,7 @@ import it.auties.whatsapp.model.message.model.reserved.ExtendedMediaMessage; import it.auties.whatsapp.model.message.server.ProtocolMessage; import it.auties.whatsapp.model.message.server.ProtocolMessageBuilder; -import it.auties.whatsapp.model.message.standard.CallMessageBuilder; -import it.auties.whatsapp.model.message.standard.NewsletterAdminInviteMessageBuilder; -import it.auties.whatsapp.model.message.standard.ReactionMessageBuilder; -import it.auties.whatsapp.model.message.standard.TextMessage; +import it.auties.whatsapp.model.message.standard.*; import it.auties.whatsapp.model.newsletter.*; import it.auties.whatsapp.model.node.Attributes; import it.auties.whatsapp.model.node.Node; @@ -749,7 +746,7 @@ public CompletableFuture pinMessage(ChatMessageKey messageKey, ChatMessage var request = new MessageSendRequest.Chat(pinInfo, null, false, false, attrs); return socketHandler.sendMessage(request); } - + public CompletableFuture sendStatus(String message) { return sendStatus(MessageContainer.of(message)); } diff --git a/src/main/java/it/auties/whatsapp/model/info/DeviceContextInfo.java b/src/main/java/it/auties/whatsapp/model/info/DeviceContextInfo.java index 9757cc5d..38070165 100644 --- a/src/main/java/it/auties/whatsapp/model/info/DeviceContextInfo.java +++ b/src/main/java/it/auties/whatsapp/model/info/DeviceContextInfo.java @@ -27,7 +27,7 @@ public final class DeviceContextInfo implements Info, ProtobufMessage { private final int messageAddOnDurationInSecs; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - public DeviceContextInfo(DeviceListMetadata deviceListMetadata, int deviceListMetadataVersion, byte[] messageSecret, byte[] paddingBytes) { + public DeviceContextInfo(DeviceListMetadata deviceListMetadata, int deviceListMetadataVersion, byte[] messageSecret, byte[] paddingBytes, int messageAddOnDurationInSecs) { this.deviceListMetadata = deviceListMetadata; this.deviceListMetadataVersion = deviceListMetadataVersion; this.messageSecret = messageSecret; @@ -55,7 +55,7 @@ public Optional paddingBytes() { return Optional.ofNullable(paddingBytes); } - public int messageAddOnDurationInSecs() { - return messageAddOnDurationInSecs; + public int messageAddOnDurationInSecs() { + return messageAddOnDurationInSecs; } } diff --git a/src/main/java/it/auties/whatsapp/model/message/model/PinInChat.java b/src/main/java/it/auties/whatsapp/model/message/model/PinInChat.java index de33d0ca..43b829cb 100644 --- a/src/main/java/it/auties/whatsapp/model/message/model/PinInChat.java +++ b/src/main/java/it/auties/whatsapp/model/message/model/PinInChat.java @@ -6,8 +6,7 @@ import it.auties.protobuf.model.ProtobufEnum; import it.auties.protobuf.model.ProtobufMessage; import it.auties.protobuf.model.ProtobufType; -import it.auties.whatsapp.model.info.MessageAddOnContextInfo; -import it.auties.whatsapp.model.jid.Jid; +import it.auties.whatsapp.model.info.DeviceContextInfo; import it.auties.whatsapp.util.Clock; import java.time.ZonedDateTime; @@ -28,7 +27,7 @@ public record PinInChat( @ProtobufProperty(index = 4, type = ProtobufType.INT64) long serverTimestampMilliseconds, @ProtobufProperty(index = 5, type = ProtobufType.OBJECT) - MessageAddOnContextInfo messageAddOnContextInfo + DeviceContextInfo messageAddOnContextInfo ) implements ProtobufMessage { public Optional serverTimestamp() { return Clock.parseMilliseconds(serverTimestampMilliseconds); }