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, target_id = nil) ⇒ Object



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

def perform(service, user_id, flow, state, target_id=nil)
  service_message = ServiceMessage.new(service: service)
  service_message.sender_id = user_id
  service_message.target_id = target_id
  controller = BotController.new(service_message: service_message)
  controller.step_to(flow: flow, state: state)
end