app/controllers/roster_controller.rb
ff94bdbf
 class RosterController < WebsocketRails::BaseController
23f7b7b2
     #include Jabber
ff94bdbf
 
     def initialize_session
23f7b7b2
         #controller_store[:friends] = {}
ff94bdbf
     end
 
70fc03c1
     def connect
23f7b7b2
         #hack_sessions()
         #Rails.logger.info "ahojte"
         Rails.logger.info "login now"
70fc03c1
         login()
23f7b7b2
         trigger_success msg: "asdds"
 
         #login()
         #get_roster()
70fc03c1
     end
 
ff94bdbf
     ##
     # Vrat vsetkych priatelov v rosteri
70fc03c1
     def get_roster
23f7b7b2
         #controller_store[:friends]
ff94bdbf
     end
 
     ##
     # Pridaj noveho priatela do zoznamu
     def add_friend(data)
 
     end
70fc03c1
 
     private
 
23f7b7b2
     def login
         Rails.logger.info session[:token].inspect
         #user_id = Token.find_by(token: session[:token]).user_id
         #Rails.logger.info "user ID" + user_id.inspect
     end
 
70fc03c1
     def hack_sessions
23f7b7b2
         #session[:a] = true
         #Rails.logger.info session.inspect
 
         #Rails.logger.info request.session.inspect
         #Rails.logger.info request.cookies["rack.session"]
         #session.delete :a
         #Rails.logger.info session.inspect
70fc03c1
     end
ff94bdbf
 end