mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
fix: Profile pictures missing in facebook inbox [CW-1976] (#9212)
The ActiveJob FacebookEventsJob created a Contact and then enqueued Avatar::AvatarFromUrlJob in another process. However, since the Contact was created within a transaction when AvatarFromUrlJob was executed immediately afterwards, the Contact was not actually present in the database then. Fixes: #6138 #6761
This commit is contained in:
@@ -19,9 +19,9 @@ class ContactInboxWithContactBuilder
|
||||
|
||||
ActiveRecord::Base.transaction(requires_new: true) do
|
||||
build_contact_with_contact_inbox
|
||||
update_contact_avatar(@contact) unless @contact.avatar.attached?
|
||||
@contact_inbox
|
||||
end
|
||||
update_contact_avatar(@contact) unless @contact.avatar.attached?
|
||||
@contact_inbox
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user