Skip to main content

Client API v1.7.3

Fixed an issue where the GET /messages call would return null on everything instead of empty arrays for keys that contain arrays

Null back to empty arrays

When the message was send by an Agent using the Service API version 2.0B the client api would return

{
"carousel": null,
"quickReplies": null,
"custom": null,
"title": null,
"media": null,
"buttons": null
}

instead of

{
"carousel": [],
"quickReplies": [],
"custom": [],
"title": null,
"media": null,
"buttons": []
}

This did not happen when the Agent used the Service API version 2.1 or higher.

This inconsistency with return types caused the Web library v1.6.0 to crash with the error

Uncaught Error: Error when loading template adminLayout: Cannot read properties of undefined (reading 'length')

when receiving such a response from the Client API because it expected buttons to of type array and not null.