diff --git a/src/main/java/it/auties/whatsapp/model/message/model/ChatMessageKey.java b/src/main/java/it/auties/whatsapp/model/message/model/ChatMessageKey.java index 18c46724..d00cf567 100644 --- a/src/main/java/it/auties/whatsapp/model/message/model/ChatMessageKey.java +++ b/src/main/java/it/auties/whatsapp/model/message/model/ChatMessageKey.java @@ -69,7 +69,7 @@ public static String randomId() { */ public static String randomIdV2(Jid jid, ClientType... clientType) { - var type = Objects.requireNonNullElse(clientType[0], ClientType.WEB); + var type = clientType.length == 0 ? ClientType.WEB : clientType[0]; return switch (type) { case ClientType.WEB -> randomWebKeyId(jid); case ClientType.MOBILE -> randomMobileKeyId(jid);