PLT-6019: Add APIv4 Endpoint for restoring Channels (#6263)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
34728f748b
Коммит
0a20e8d326
@@ -1217,6 +1217,16 @@ func (c *Client4) PatchChannel(channelId string, patch *ChannelPatch) (*Channel,
|
||||
}
|
||||
}
|
||||
|
||||
// RestoreChannel restores a previously deleted channel. Any missing fields are not updated.
|
||||
func (c *Client4) RestoreChannel(channelId string) (*Channel, *Response) {
|
||||
if r, err := c.DoApiPost(c.GetChannelRoute(channelId)+"/restore", ""); err != nil {
|
||||
return nil, &Response{StatusCode: r.StatusCode, Error: err}
|
||||
} else {
|
||||
defer closeBody(r)
|
||||
return ChannelFromJson(r.Body), BuildResponse(r)
|
||||
}
|
||||
}
|
||||
|
||||
// CreateDirectChannel creates a direct message channel based on the two user
|
||||
// ids provided.
|
||||
func (c *Client4) CreateDirectChannel(userId1, userId2 string) (*Channel, *Response) {
|
||||
|
||||
Ссылка в новой задаче
Block a user