lib/socrates/core/dispatcher.rb in socrates-0.1.16 vs lib/socrates/core/dispatcher.rb in socrates-0.1.17

- old
+ new

@@ -44,11 +44,11 @@ state_data = Socrates::Core::StateData.new(state_id: state_id, state_action: :ask) persist_state_data(session.client_id, state_data) # Send our initial message if one was passed to us. - @adapter.send_direct_message(session, message, user) if message.present? + @adapter.queue_direct_message(session, message, user) if message.present? do_dispatch(session, nil) true end @@ -170,10 +170,10 @@ def handle_action_error(e, session, state) @logger.warn "Error while processing action #{state.data.state_id}/#{state.data.state_action}: #{e.message}" @logger.warn e - @adapter.send_message(session, @error_message, send_now: true) + @adapter.queue_message(session, @error_message, send_now: true) state.data.clear state.data.state_id = nil state.data.state_action = nil