summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
authorJesús Espino <jespinog@gmail.com>2018-08-03 10:44:32 +0200
committerGitHub <noreply@github.com>2018-08-03 10:44:32 +0200
commit8cc4f27f7cb17af34951ad4c7a59ca7bad082f61 (patch)
treec1776cc305ab1a80a451d36765447b61511d4ab4 /app/channel.go
parent7a731d2bd162419086f3aeec98ec41dfcaa16696 (diff)
downloadchat-8cc4f27f7cb17af34951ad4c7a59ca7bad082f61.tar.gz
chat-8cc4f27f7cb17af34951ad4c7a59ca7bad082f61.tar.bz2
chat-8cc4f27f7cb17af34951ad4c7a59ca7bad082f61.zip
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
Diffstat (limited to 'app/channel.go')
-rw-r--r--app/channel.go10
1 files changed, 0 insertions, 10 deletions
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)
})