-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Different "starred" field format in REST API "dm.history" and "channels.messages" #12218
Comments
@rodrigok FYI he's talking about the REST API, not the WebSocket method. Rocket.Chat/packages/rocketchat-api/server/v1/channels.js Lines 541 to 577 in a8ab8f1
|
@rafaelks the endpoint described above was another: |
@rafaelks as @MarcosSpessatto said, Lucio posted a call for The The problem here is that we are not processing the starred array on that 2 places and we should since we should only return the user's stars, and the message contains the stars of all users who starred the message. I already talked with @sampaiodiego and he will organize how to solve this. |
I've changed the issue title to reflect the issue. |
Previously the the API would always return an JSON_ARRAY, even when there were just one user that starred a message.
In the latest RC version (0.70.0) this changed and now the API sends an JSON_OBJECT when there is only one star, and JSON_ARRAY when there is more than one.
Android can't handle this very well, we expect that a API field is ALWAYS the same type, always a String, or always a boolean, or always an array or an object, but never multiple types for the same field name.
The text was updated successfully, but these errors were encountered: