FEATURE: Allow editing channel slug (#19948)

This commit introduces the ability to edit the channel
slug from the About tab for the chat channel when the user
is admin. Similar to the create channel modal functionality
introduced in 641e94f, if
the slug is left empty then we autogenerate a slug based
on the channel name, and if the user just changes the slug
manually we use that instead.

We do not do any link remapping or anything else of the
sort, when the category slug is changed that does not happen
either.
This commit is contained in:
Martin Brennan
2023-01-30 13:18:34 +10:00
committed by GitHub
parent 7ec6e6b3d0
commit db5ad34508
14 changed files with 233 additions and 71 deletions

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
CHANNEL_EDITABLE_PARAMS = %i[name description]
CHANNEL_EDITABLE_PARAMS = %i[name description slug]
CATEGORY_CHANNEL_EDITABLE_PARAMS = %i[auto_join_users allow_channel_wide_mentions]
class Chat::Api::ChatChannelsController < Chat::Api