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
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7a731d2bd1
Коммит
8cc4f27f7c
@@ -1974,6 +1974,18 @@ func TestRemoveChannelMember(t *testing.T) {
|
||||
_, resp = th.SystemAdminClient.RemoveUserFromChannel(th.BasicChannel.Id, th.BasicUser.Id)
|
||||
CheckNoError(t, resp)
|
||||
|
||||
// Leave deleted channel
|
||||
th.LoginBasic()
|
||||
deletedChannel := th.CreatePublicChannel()
|
||||
th.App.AddUserToChannel(th.BasicUser, deletedChannel)
|
||||
th.App.AddUserToChannel(th.BasicUser2, deletedChannel)
|
||||
|
||||
deletedChannel.DeleteAt = 1
|
||||
th.App.UpdateChannel(deletedChannel)
|
||||
|
||||
_, resp = Client.RemoveUserFromChannel(deletedChannel.Id, th.BasicUser.Id)
|
||||
CheckNoError(t, resp)
|
||||
|
||||
th.LoginBasic()
|
||||
private := th.CreatePrivateChannel()
|
||||
th.App.AddUserToChannel(th.BasicUser2, private)
|
||||
|
||||
Ссылка в новой задаче
Block a user