fix client4 post sanitization (#8219)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
f28ee8d7c8
Коммит
cf929476bd
@@ -1729,7 +1729,7 @@ func (c *Client4) RemoveUserFromChannel(channelId, userId string) (bool, *Respon
|
||||
|
||||
// CreatePost creates a post based on the provided post struct.
|
||||
func (c *Client4) CreatePost(post *Post) (*Post, *Response) {
|
||||
if r, err := c.DoApiPost(c.GetPostsRoute(), post.ToJson()); err != nil {
|
||||
if r, err := c.DoApiPost(c.GetPostsRoute(), post.ToUnsanitizedJson()); err != nil {
|
||||
return nil, BuildErrorResponse(r, err)
|
||||
} else {
|
||||
defer closeBody(r)
|
||||
@@ -1739,7 +1739,7 @@ func (c *Client4) CreatePost(post *Post) (*Post, *Response) {
|
||||
|
||||
// UpdatePost updates a post based on the provided post struct.
|
||||
func (c *Client4) UpdatePost(postId string, post *Post) (*Post, *Response) {
|
||||
if r, err := c.DoApiPut(c.GetPostRoute(postId), post.ToJson()); err != nil {
|
||||
if r, err := c.DoApiPut(c.GetPostRoute(postId), post.ToUnsanitizedJson()); err != nil {
|
||||
return nil, BuildErrorResponse(r, err)
|
||||
} else {
|
||||
defer closeBody(r)
|
||||
|
||||
Ссылка в новой задаче
Block a user