AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

no $username in <call> ?
 
 

Hi all,

I am using the <call> feature to call some perl code from within my bot.  I need to authenticate the user session, and I was hoping to use the $username variable that is passed to the reply variable.  Problem is, that variable is not present anywhere within the $rs name space.

Adding something like

$self->{_internal}->{user} $user

within the reply procedure would make a big difference.  Having the original input message available as well before it gets normalized for parsing would also help to be available in a memory structure somewhere.

Thanks!

 

 
  [ # 1 ]

There’s a method `$rs->currentUser()` that you can use.

 

 
  login or register to react