Class: Sinbotra::Messenger::User

Inherits:
Bot::User show all
Defined in:
lib/sinbotra/messenger/user.rb

Instance Attribute Summary

Attributes inherited from Bot::User

#conversations, #current_message, #history, #id, #session_id

Class Method Summary collapse

Methods inherited from Bot::User

#current_conversation, #destroy, #handle_message, #in_conversation?, #initialize, #logged_in?, #start_conversation

Constructor Details

This class inherits a constructor from Sinbotra::Bot::User

Class Method Details

.load(msg) ⇒ Object



3
4
5
6
7
8
# File 'lib/sinbotra/messenger/user.rb', line 3

def self.load(msg)
  msg  = Sinbotra::Messenger::Message.load(msg)
  user = Sinbotra::Bot::UserRepo.find_or_create(self, msg.sender.id)
  user.handle_message(msg)
  user
end