chore: Add message_echo listener for Facebook (#1192)

Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2020-09-04 19:13:47 +05:30
committed by GitHub
parent 715bd368f4
commit d18c8fc08a
12 changed files with 51 additions and 11 deletions

View File

@@ -19,4 +19,10 @@ class FacebookBot
updater.perform
Rails.logger.info "Human was online at #{delivery.at}"
end
Bot.on :message_echo do |message|
Rails.logger.info "MESSAGE_ECHO #{message}"
response = ::Integrations::Facebook::MessageParser.new(message)
::Integrations::Facebook::MessageCreator.new(response).perform
end
end