Check Connect feature flag in more places (#14795)

This commit is contained in:
Michael Kohl 2021-09-23 21:02:27 +07:00 committed by GitHub
parent bb8b32bdf2
commit 9c2d33bda0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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