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

Fix api-call in update_post #105

Merged
merged 1 commit into from
Apr 2, 2019
Merged

Conversation

3mb3dw0rk5
Copy link
Contributor

According to Mattermost-API-v4 documentation https://api.mattermost.com/#tag/posts%2Fpaths%2F~1posts~1%7Bpost_id%7D~1patch%2Fput the update_post shall be called with sub-path /patch.

According to Mattermost-API-v4 documentation https://api.mattermost.com/#tag/posts%2Fpaths%2F~1posts~1%7Bpost_id%7D~1patch%2Fput the update_post shall be called with sub-path `/patch`.
@attzonko
Copy link
Owner

attzonko commented Apr 2, 2019

Thanks for finding and fixing this. For future reference:

  • Updating post with /posts/{post_id} only sets omitted fields will be treated as blank, which is undesirable for our update_post() API
  • Patching a post with /posts/{post_id}/patch correctly updates only the field we wish to update leaving the rest intact

@attzonko attzonko merged commit 96d0d23 into attzonko:master Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants