Feature: Website SDK (#653)
Add SDK functions Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
@@ -17,6 +17,10 @@ class MessageTemplates::HookExecutionService
|
||||
end
|
||||
|
||||
def should_send_email_collect?
|
||||
conversation.inbox.web_widget? && first_message_from_contact?
|
||||
!contact_has_email? && conversation.inbox.web_widget? && first_message_from_contact?
|
||||
end
|
||||
|
||||
def contact_has_email?
|
||||
contact.email
|
||||
end
|
||||
end
|
||||
|
||||
@@ -30,11 +30,6 @@ class Twitter::WebhooksBaseService
|
||||
user['id'], user['name'], additional_contact_attributes(user)
|
||||
)
|
||||
@contact = @contact_inbox.contact
|
||||
avatar_resource = LocalResource.new(user['profile_image_url'])
|
||||
@contact.avatar.attach(
|
||||
io: avatar_resource.file,
|
||||
filename: avatar_resource.tmp_filename,
|
||||
content_type: avatar_resource.encoding
|
||||
)
|
||||
ContactAvatarJob.perform_later(@contact, user['profile_image_url']) if user['profile_image_url']
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user