From 8cc4f27f7cb17af34951ad4c7a59ca7bad082f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Fri, 3 Aug 2018 10:44:32 +0200 Subject: MM-11529: Allow to Leave an archived channel from the API (#9204) * MM-11529: Allow to Leave an archived channel from the API * Remove the restriction to remove user from archive channel to yourself --- app/channel.go | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'app/channel.go') diff --git a/app/channel.go b/app/channel.go index 830dbb8b7..0a89574ac 100644 --- a/app/channel.go +++ b/app/channel.go @@ -1380,11 +1380,6 @@ func (a *App) postRemoveFromChannelMessage(removerUserId string, removedUser *mo } func (a *App) removeUserFromChannel(userIdToRemove string, removerUserId string, channel *model.Channel) *model.AppError { - if channel.DeleteAt > 0 { - err := model.NewAppError("RemoveUserFromChannel", "api.channel.remove_user_from_channel.deleted.app_error", nil, "", http.StatusBadRequest) - return err - } - if channel.Name == model.DEFAULT_CHANNEL { return model.NewAppError("RemoveUserFromChannel", "api.channel.remove.default.app_error", map[string]interface{}{"Channel": model.DEFAULT_CHANNEL}, "", http.StatusBadRequest) } @@ -1449,11 +1444,6 @@ func (a *App) RemoveUserFromChannel(userIdToRemove string, removerUserId string, if userIdToRemove == removerUserId { a.postLeaveChannelMessage(user, channel) } else { - - if err != nil { - return err - } - a.Go(func() { a.postRemoveFromChannelMessage(removerUserId, user, channel) }) -- cgit v1.2.3-1-g7c22