feat: Use inbox image as avatar for the bot (#6859)

This commit is contained in:
Pranav Raj S
2023-04-07 13:25:18 -07:00
committed by GitHub
parent 463c09184c
commit 91dc7733b0
12 changed files with 53 additions and 20 deletions

View File

@@ -0,0 +1,12 @@
class MigrateEnvVarToChannelFeature < ActiveRecord::Migration[6.1]
def change
return unless ActiveModel::Type::Boolean.new.cast(ENV.fetch('USE_INBOX_AVATAR_FOR_BOT', false))
Channel::WebWidget.find_in_batches do |widget_batch|
widget_batch.each do |widget|
widget.use_inbox_avatar_for_bot = true
widget.save!
end
end
end
end