lib/stealth/services/facebook/message_handler.rb in stealth-facebook-0.12.0 vs lib/stealth/services/facebook/message_handler.rb in stealth-facebook-0.13.0

- old
+ new

@@ -1,10 +1,11 @@ # coding: utf-8 # frozen_string_literal: true require 'stealth/services/facebook/events/message_event' require 'stealth/services/facebook/events/postback_event' +require 'stealth/services/facebook/events/message_reads_event' module Stealth module Services module Facebook @@ -68,9 +69,14 @@ service_message: service_message, params: facebook_message ) elsif facebook_message['postback'].present? message_event = Stealth::Services::Facebook::PostbackEvent.new( + service_message: service_message, + params: facebook_message + ) + elsif facebook_message['read'].present? + message_event = Stealth::Services::Facebook::MessageReadsEvent.new( service_message: service_message, params: facebook_message ) end