mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Clear context error on post creation when create_at is set (#4615)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user