chore: Sync pre-chat fields after custom attribute destroy (#4456)

This commit is contained in:
Muhsin Keloth
2022-04-18 14:06:27 +05:30
committed by GitHub
parent 04e890070d
commit e010f0c6f0
3 changed files with 44 additions and 0 deletions

View File

@@ -34,4 +34,11 @@ class CustomAttributeDefinition < ApplicationRecord
enum attribute_display_type: { text: 0, number: 1, currency: 2, percent: 3, link: 4, date: 5, list: 6, checkbox: 7 }
belongs_to :account
after_destroy :sync_widget_pre_chat_custom_fields
private
def sync_widget_pre_chat_custom_fields
::Inboxes::SyncWidgetPreChatCustomFieldsJob.perform_later(attribute_key)
end
end