Adds a feature flag to control availability of DMs in shared channels (#28920)

* Adds a feature flag to control availability of DMs in shared channels

* Reverse feature flag wording
Этот коммит содержится в:
Miguel de la Cruz
2024-10-24 19:38:00 +02:00
коммит произвёл GitHub
родитель 6075b1cd4e
Коммит cb03009992
6 изменённых файлов: 18 добавлений и 11 удалений

Просмотреть файл

@@ -141,7 +141,7 @@ func (a *App) deduplicateCreatePost(rctx request.CTX, post *model.Post) (foundPo
}
func (a *App) CreatePost(c request.CTX, post *model.Post, channel *model.Channel, flags model.CreatePostFlags) (savedPost *model.Post, err *model.AppError) {
if channel.IsShared() && (channel.Type == model.ChannelTypeDirect || channel.Type == model.ChannelTypeGroup) {
if !a.Config().FeatureFlags.EnableSharedChannelsDMs && channel.IsShared() && (channel.Type == model.ChannelTypeDirect || channel.Type == model.ChannelTypeGroup) {
return nil, model.NewAppError("CreatePost", "app.post.create_post.shared_dm_or_gm.app_error", nil, "", http.StatusBadRequest)
}