[MM-21464] api4/channel: add ability to force move channel by removing non-members (#14887)
* api4/channel: add ability to force move channel by removing non-members * app/channel: add log to move channel for non taget team members * app/channel: add tets for remove non-team members for channel * Update api4/channel_test.go Co-authored-by: Eli Yukelzon <reflog@gmail.com> Co-authored-by: Eli Yukelzon <reflog@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b916bae0f7
Коммит
bf664997a7
@@ -2503,11 +2503,12 @@ func (c *Client4) DeleteChannel(channelId string) (bool, *Response) {
|
||||
}
|
||||
|
||||
// MoveChannel moves the channel to the destination team.
|
||||
func (c *Client4) MoveChannel(channelId, teamId string) (*Channel, *Response) {
|
||||
requestBody := map[string]string{
|
||||
func (c *Client4) MoveChannel(channelId, teamId string, force bool) (*Channel, *Response) {
|
||||
requestBody := map[string]interface{}{
|
||||
"team_id": teamId,
|
||||
"force": force,
|
||||
}
|
||||
r, err := c.DoApiPost(c.GetChannelRoute(channelId)+"/move", MapToJson(requestBody))
|
||||
r, err := c.DoApiPost(c.GetChannelRoute(channelId)+"/move", StringInterfaceToJson(requestBody))
|
||||
if err != nil {
|
||||
return nil, BuildErrorResponse(r, err)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user