diff --git a/src/main/java/it/auties/whatsapp/socket/MessageHandler.java b/src/main/java/it/auties/whatsapp/socket/MessageHandler.java index 0ab21b01..da8adbae 100644 --- a/src/main/java/it/auties/whatsapp/socket/MessageHandler.java +++ b/src/main/java/it/auties/whatsapp/socket/MessageHandler.java @@ -1076,10 +1076,12 @@ private void saveMessage(ChatMessageInfo info, boolean notify) { return; } if (info.message().hasCategory(MessageCategory.SERVER)) { - if (info.message().content() instanceof ProtocolMessage protocolMessage) { + if (!(info.message().content() instanceof ProtocolMessage protocolMessage)) return; + if (protocolMessage.protocolType() == null) return; + if (!protocolMessage.protocolType().equals(ProtocolMessage.Type.MESSAGE_EDIT)) { handleProtocolMessage(info, protocolMessage); + return; } - return; } var chat = info.chat()