Chore: Add Facebook app set up documentation (#647)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
This commit is contained in:
@@ -32,13 +32,35 @@ class Facebook::SendReplyService
|
||||
# end
|
||||
# end
|
||||
|
||||
def fb_message_params
|
||||
def fb_text_message_params
|
||||
{
|
||||
recipient: { id: contact.get_source_id(inbox.id) },
|
||||
message: { text: message.content }
|
||||
}
|
||||
end
|
||||
|
||||
def fb_attachment_message_params
|
||||
{
|
||||
recipient: { id: contact.get_source_id(inbox.id) },
|
||||
message: {
|
||||
attachment: {
|
||||
type: 'image',
|
||||
payload: {
|
||||
url: message.attachment.file_url
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
def fb_message_params
|
||||
if message.attachment.blank?
|
||||
fb_text_message_params
|
||||
else
|
||||
fb_attachment_message_params
|
||||
end
|
||||
end
|
||||
|
||||
def delivery_params
|
||||
if twenty_four_hour_window_over?
|
||||
fb_message_params.merge(tag: 'ISSUE_RESOLUTION')
|
||||
|
||||
Reference in New Issue
Block a user