I could not find if this was discovered/fixed so forgive me if this has already been resolved.
When creating a channel [that has previously been "deleted"] through the API, instead of reactivating the channel Mattermost will return a 500 error.
Mattermost version 3.3.0
/api/v3/{team}/channels/create using bare minimum (name, display name, purpose)./api/v3/teams/{team}/channels/ & note that deleted channel is not listed/api/v3/{team}/channels/createI would expect that upon deleting a channel (which I understand simply marks it as inactive by filling in the deleteat column in the channels table), requests to create a channel with the same name should reactivate the old one.
A 500 error was returned from the Mattermost API and the channel remained deleted.
I will try to reproduce in the current version on Monday :)
I was able to reproduce the issue in the current master
Steps:
1 - Create new channel
2 - List all channels and check that new channel is in the list
3 - Delete thru the UI or API
4 - List all channel and check it not appears any more
5 - try to create again the channel, however it not possible
Error:
{
"id": "store.sql_channel.save_channel.previously.app_error",
"message": "A channel with that URL was previously created",
"detailed_error": "id=73bo437t7igqjpy6zygf4uoi6w, Error 1062: Duplicate entry 'mytestchannel-9qncs3gydidcikx1s9g8ft133h' for key 'Name'",
"request_id": "85qcs3aampf49beay15bqbokdo",
"status_code": 500
}
@jasonblais please let me know if this is suppose to happen or its a bug, if it is I can work on to fix it
Hey @jkae, @cpanato ,
Currently, once a channel is "deleted" it is archived in the Mattermost system. That means you're not able to re-create the channel with the same URL given it still exists in the system (as an archive).
There are some improvements planned to improve the user experience on this.
However, in the meantime you can restore a previously deleted channel using an existing command line tool:
platform channel restore myteam:mychannel
ok. :)
Thanks for the response & info on the command.
no problem! :) Glad I could help @jkae
Most helpful comment
Hey @jkae, @cpanato ,
Currently, once a channel is "deleted" it is archived in the Mattermost system. That means you're not able to re-create the channel with the same URL given it still exists in the system (as an archive).
There are some improvements planned to improve the user experience on this.
However, in the meantime you can restore a previously deleted channel using an existing command line tool:
You can get more details in our docs