Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

messages edit method fails as custom data is sent as array not an object #11

Open
fabregas4 opened this issue Apr 19, 2023 · 0 comments

Comments

@fabregas4
Copy link

Firstly, the edit() method should not require $custom to be passed in. This should be optional.

Secondly the method does not work. The API rejects the request as it is expecting an object not an array. It returns Bad request. Content: {"reasons":{"custom":"Expected object but got array"}

Need to put (object) in front of $custom, like so:
$this->httpPut("conversations/$conversationId/messages/$messageId", ['text' => $text, 'custom' => (object) $custom])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant