diff --git a/src/main/java/it/auties/whatsapp/api/Whatsapp.java b/src/main/java/it/auties/whatsapp/api/Whatsapp.java index 16becb88..6d3d0533 100644 --- a/src/main/java/it/auties/whatsapp/api/Whatsapp.java +++ b/src/main/java/it/auties/whatsapp/api/Whatsapp.java @@ -656,11 +656,16 @@ public CompletableFuture editMessage(T oldMessage, Me .fromMe(true) .senderJid(jidOrThrowError()) .build(); + var protocol = new ProtocolMessageBuilder() + .protocolType(ProtocolMessage.Type.MESSAGE_EDIT) + .key(key) + .editedMessage(MessageContainer.of(newMessage)) + .build(); var info = new ChatMessageInfoBuilder() .status(MessageStatus.PENDING) .senderJid(jidOrThrowError()) .key(key) - .message(MessageContainer.ofEditedMessage(newMessage)) + .message(MessageContainer.ofEditedMessage(protocol)) .timestampSeconds(Clock.nowSeconds()) .broadcast(oldChatInfo.chatJid().hasServer(JidServer.BROADCAST)) .build();