Check Connect feature flag in more places (#14795)
This commit is contained in:
parent
bb8b32bdf2
commit
9c2d33bda0
2 changed files with 3 additions and 1 deletions
|
|
@ -31,6 +31,8 @@ class OrganizationMembership < ApplicationRecord
|
|||
end
|
||||
|
||||
def add_chat_channel_membership(user, channel, role)
|
||||
return unless FeatureFlag.enabled?(:connect)
|
||||
|
||||
membership = ChatChannelMembership.find_or_initialize_by(user_id: user.id, chat_channel_id: channel.id)
|
||||
membership.role = role
|
||||
membership.save
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ module TagModerators
|
|||
tag = Tag.find(tag_ids[index])
|
||||
add_tag_mod_role(user, tag)
|
||||
::TagModerators::AddTrustedRole.call(user)
|
||||
add_to_chat_channels(user, tag)
|
||||
add_to_chat_channels(user, tag) if FeatureFlag.enabled?(:connect)
|
||||
tag.update(supported: true) unless tag.supported?
|
||||
|
||||
NotifyMailer
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue