summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api4/channel_test.go2
-rw-r--r--app/channel.go8
-rw-r--r--i18n/en.json8
3 files changed, 0 insertions, 18 deletions
diff --git a/api4/channel_test.go b/api4/channel_test.go
index c2a0131cf..5ca4dee6e 100644
--- a/api4/channel_test.go
+++ b/api4/channel_test.go
@@ -846,8 +846,6 @@ func TestDeleteChannel(t *testing.T) {
if ch, err := th.App.GetChannel(publicChannel1.Id); err == nil && ch.DeleteAt == 0 {
t.Fatal("should have failed to get deleted channel")
- } else if err := th.App.JoinChannel(ch, user2.Id); err == nil {
- t.Fatal("should have failed to join deleted channel")
}
post1 := &model.Post{ChannelId: publicChannel1.Id, Message: "a" + GenerateTestId() + "a"}
diff --git a/app/channel.go b/app/channel.go
index 0a89574ac..1e48c3c50 100644
--- a/app/channel.go
+++ b/app/channel.go
@@ -740,10 +740,6 @@ func (a *App) DeleteChannel(channel *model.Channel, userId string) *model.AppErr
}
func (a *App) addUserToChannel(user *model.User, channel *model.Channel, teamMember *model.TeamMember) (*model.ChannelMember, *model.AppError) {
- if channel.DeleteAt > 0 {
- return nil, model.NewAppError("AddUserToChannel", "api.channel.add_user_to_channel.deleted.app_error", nil, "", http.StatusBadRequest)
- }
-
if channel.Type != model.CHANNEL_OPEN && channel.Type != model.CHANNEL_PRIVATE {
return nil, model.NewAppError("AddUserToChannel", "api.channel.add_user_to_channel.type.app_error", nil, "", http.StatusBadRequest)
}
@@ -1178,10 +1174,6 @@ func (a *App) GetChannelUnread(channelId, userId string) (*model.ChannelUnread,
}
func (a *App) JoinChannel(channel *model.Channel, userId string) *model.AppError {
- if channel.DeleteAt > 0 {
- return model.NewAppError("JoinChannel", "api.channel.join_channel.already_deleted.app_error", nil, "", http.StatusBadRequest)
- }
-
userChan := a.Srv.Store.User().Get(userId)
memberChan := a.Srv.Store.Channel().GetMember(channel.Id, userId)
diff --git a/i18n/en.json b/i18n/en.json
index 7af981b0a..3c2cee632 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -92,10 +92,6 @@
"translation": "Failed to add user to channel because they have been removed from the team."
},
{
- "id": "api.channel.add_user_to_channel.deleted.app_error",
- "translation": "The channel has been archived or deleted"
- },
- {
"id": "api.channel.add_user_to_channel.type.app_error",
"translation": "Can not add user to this channel type"
},
@@ -164,10 +160,6 @@
"translation": "Cannot delete direct or group message channels"
},
{
- "id": "api.channel.join_channel.already_deleted.app_error",
- "translation": "Channel is already deleted"
- },
- {
"id": "api.channel.join_channel.permissions.app_error",
"translation": "You do not have the appropriate permissions"
},