CLI MoveChannel, incorrect member listing

I’ve got two channels that I have removed all members from (in anticipation of moving them), I’ve also re-activated members that were deactivated and removed them as well. However every time I try to process the move I get the error:

MoveChannel: Unable to move a channel unless all its members are already members of the destination team.

How can I troubleshoot this further?

Hello, @agd

I was wondering if you can share the CLI command you ran on your instance to see if we missed out on anything. Will that be okay for you?

Additionally, may I know if you can utilize the following parameter while running the mattermost channel move command on your instance and verify if you are still running into the same issue?

--remove-deactivated-users   Automatically remove any deactivated users from the channel before moving it.
1 Like

That is the critical thing, Where did you find this documented? I can’t seem to locate it in the current documentation.

Hello, @agd

While this was not included in the official documentation explicitly, you will be able to see it when you run the command below:

ahmaddanial@mattermost:/opt/mattermost/bin$ ./mattermost channel move --help
Moves the provided channels to the specified team.
Validates that all users in the channel belong to the target team. Incoming/Outgoing webhooks are moved along with the channel.
Channels can be specified by [team]:[channel]. ie. myteam:mychannel or by channel ID.

  mattermost channel move [team] [channels] --username [user] [flags]

  channel move newteam oldteam:mychannel --username myusername

  -h, --help                       help for move
      --remove-deactivated-users   Automatically remove any deactivated users from the channel before moving it.
      --username string            Required. Username who is moving the channel.

Global Flags:
  -c, --config string        Configuration file to use. (default "config.json")
      --disableconfigwatch   When set config.json will not be loaded from disk when the file is changed.

May I know if the issue is sorted out on your end?