lib/rubotnik/message_dispatch.rb in rubotnik-0.2.0 vs lib/rubotnik/message_dispatch.rb in rubotnik-0.2.1
- old
+ new
@@ -11,17 +11,17 @@
def initialize(message)
@message = message
p @message.class
p @message
- @user = UserStore.instance.find_or_create_user(@message.sender['id'])
+ @user = Rubotnik::UserStore.instance.find_or_create_user(@message.sender['id'])
end
def route(&block)
if @user.current_command
command = @user.current_command
execute(command)
- puts "Command #{command} is executed for user #{@user.id}" # log
+ puts "Command #{command} is executed for user #{@user.id}"
else
bind_commands(&block)
end
rescue StandardError => error
raise unless ENV["DEBUG"] == "true"