Clear context error on post creation when create_at is set (#4615)

This commit is contained in:
Joram Wilander
2016-11-21 12:19:21 -05:00
committed by GitHub
parent 5cf0405411
commit 29cfa2e64f
2 changed files with 2 additions and 1 deletions

View File

@@ -134,6 +134,7 @@ func CreatePost(c *Context, post *model.Post, triggerWebhooks bool) (*model.Post
if post.CreateAt != 0 && !HasPermissionToContext(c, model.PERMISSION_MANAGE_SYSTEM) {
post.CreateAt = 0
c.Err = nil
}
post.Hashtags, _ = model.ParseHashtags(post.Message)

View File

@@ -1508,7 +1508,7 @@ export default class Client {
set(this.defaultHeaders).
type('application/json').
accept('application/json').
send(post).
send({...post, create_at: 0}).
end(this.handleResponse.bind(this, 'createPost', success, error));
this.track('api', 'api_posts_create', post.channel_id, 'length', post.message.length);