Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(sdk): mark the Java sendDocument filename as optional

Yudhi Armyndharis7245b0161fff
diff --git a/sdk/java/src/main/java/com/rmyndharis/openwa/resources/MessagesResource.java b/sdk/java/src/main/java/com/rmyndharis/openwa/resources/MessagesResource.java
index d0e6ef179..269c7a7d9 100644
--- a/sdk/java/src/main/java/com/rmyndharis/openwa/resources/MessagesResource.java
+++ b/sdk/java/src/main/java/com/rmyndharis/openwa/resources/MessagesResource.java
@@ -81,7 +81,11 @@ public final class MessagesResource {
return sendMedia(sessionId, "send-audio", body);
}
- /** Send a document (url or base64; {@code filename} required). */
+ /**
+ * Send a document (url or base64). {@code filename} is optional and is the name the recipient
+ * sees; without it the gateway uses {@code "file"}, or the URL basename for a URL send on
+ * whatsapp-web.js.
+ */
public MessageResponse sendDocument(String sessionId, SendMediaRequest body) {
return sendMedia(sessionId, "send-document", body);
}