I upgraded mattermost (community) from 5.12 to 5.37 (and now back to 5.26 due to post errors, still have a problem).
after the upgrade i can not send posts (I am able to create channels and add users).
request:
{"channel_id":"jf8nbxfxc3r9tgh1gqd3jqwo45","message":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","root_id":null,"file_ids":[],"props":{"channel":null,"desktop":null,"desktop_sound":null,"email":null,"first_name":null,"mention_keys":null,"push":null,"username":null,"desktop_duration":0}}
response:
{
"id": "api.context.invalid_body_param.app_error",
"message": "Invalid or missing post in request body.",
"detailed_error": "",
"request_id": "dkysso931iro7bug3fn714eyme",
"status_code": 400
}
I found out that when i remove parts of the props the post gets 200 response.
nothing changed in the post request build and the release notes only props mention is:
“Direct access to the Props field in the model.Post structure has been deprecated. The available GetProps() and SetProps() methods should now be used. Also, direct copy of the model.Post structure must be avoided in favor of the provided Clone() method.”