Class: Stealth::ScheduledReplyJob

Inherits:
Jobs
  • Object
show all
Defined in:
lib/stealth/scheduled_reply.rb

Instance Method Summary collapse

Instance Method Details

#perform(service, user_id, flow, state) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/stealth/scheduled_reply.rb', line 9

def perform(service, user_id, flow, state)
  service_message = ServiceMessage.new(service: service)
  service_message.sender_id = user_id
  controller = BotController.new(service_message: service_message)
  controller.update_session_to(flow: flow, state: state)
  controller.route
end