Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(sdk): say that a skipped profile picture id is absent from the map

Yudhi Armyndharis78f42b35c2f8
diff --git a/sdk/go/contacts.go b/sdk/go/contacts.go
index bcd40bd4b..c3072560a 100644
--- a/sdk/go/contacts.go
+++ b/sdk/go/contacts.go
@@ -54,7 +54,7 @@ func (s *ContactsService) ProfilePicture(ctx context.Context, sessionID, contact
// ProfilePictures batch-resolves profile picture URLs for up to 50 contacts
// in one request. The result maps each requested id to its URL (nil when the
-// lookup failed).
+// lookup failed). An id skipped after a lookup timed out is absent from the map; ask for it again.
func (s *ContactsService) ProfilePictures(ctx context.Context, sessionID string, ids []string) (*ProfilePicturesResponse, error) {
var out ProfilePicturesResponse
q := url.Values{"ids": []string{strings.Join(ids, ",")}}
diff --git a/sdk/go/types_contact.go b/sdk/go/types_contact.go
index 0f119f18f..f952fa86a 100644
--- a/sdk/go/types_contact.go
+++ b/sdk/go/types_contact.go
@@ -33,7 +33,7 @@ type ProfilePictureResponse struct {
}
// ProfilePicturesResponse is a batch profile-picture lookup: a map of contact
-// id → picture URL (null when the lookup failed).
+// id → picture URL (null when the lookup failed). An id skipped after a lookup timed out is absent from the map; ask for it again.
type ProfilePicturesResponse struct {
Pictures map[string]*string `json:"pictures"`
}
diff --git a/sdk/java/src/main/java/com/rmyndharis/openwa/resources/ContactsResource.java b/sdk/java/src/main/java/com/rmyndharis/openwa/resources/ContactsResource.java
index 64905fa62..5d4afcf66 100644
--- a/sdk/java/src/main/java/com/rmyndharis/openwa/resources/ContactsResource.java
+++ b/sdk/java/src/main/java/com/rmyndharis/openwa/resources/ContactsResource.java
@@ -65,7 +65,7 @@ public final class ContactsResource {
/**
* Batch-resolve profile picture URLs for up to 50 contacts in one request.
- * Returns a map of contact id → URL (null when a lookup fails).
+ * Returns a map of contact id → URL (null when a lookup fails). An id skipped after a lookup timed out is absent from the map; ask for it again.
*/
public ProfilePicturesResponse profilePictures(String sessionId, List<String> ids) {
return client.request(
diff --git a/sdk/javascript/src/types.ts b/sdk/javascript/src/types.ts
index 40d1e0f75..481c22362 100644
--- a/sdk/javascript/src/types.ts
+++ b/sdk/javascript/src/types.ts
@@ -793,7 +793,7 @@ export interface ProfilePictureResponse {
url: string | null;
}
-/** Batch profile-picture lookup: a map of contact id → picture URL (null when the lookup failed). */
+/** Batch profile-picture lookup: a map of contact id → picture URL (null when the lookup failed). An id skipped after a lookup timed out is absent from the map; ask for it again. */
export interface ProfilePicturesResponse {
pictures: Record<string, string | null>;
}
diff --git a/sdk/php/src/Resources/ContactsResource.php b/sdk/php/src/Resources/ContactsResource.php
index f5056f91e..aeff825bc 100644
--- a/sdk/php/src/Resources/ContactsResource.php
+++ b/sdk/php/src/Resources/ContactsResource.php
@@ -55,7 +55,7 @@ class ContactsResource
* Batch-resolve profile picture URLs for up to 50 contacts in one request.
*
* @param list<string> $ids
- * @return array{pictures: array<string,?string>} Map of contact id → URL (null when a lookup fails).
+ * @return array{pictures: array<string,?string>} Map of contact id → URL (null when a lookup fails). An id skipped after a lookup timed out is absent from the map; ask for it again.
*/
public function profilePictures(string $sessionId, array $ids): array
{
diff --git a/sdk/python/openwa/types.py b/sdk/python/openwa/types.py
index bf2cfd10a..dbfead61d 100644
--- a/sdk/python/openwa/types.py
+++ b/sdk/python/openwa/types.py
@@ -785,7 +785,7 @@ class ProfilePictureResponse(TypedDict):
class ProfilePicturesResponse(TypedDict):
- # Map of contact id → picture URL (None when the lookup failed).
+ # Map of contact id → picture URL (None when the lookup failed). An id skipped after a lookup timed out is absent from the map; ask for it again.
pictures: dict[str, str | None]