Commit 6f7e3611 authored by Armando Lüscher's avatar Armando Lüscher

Fix commands that use conversations to use corrected methods.

parent 61d732cc
......@@ -26,7 +26,7 @@ class SendtochannelCommand extends AdminCommand
protected $name = 'sendtochannel';
protected $description = 'Send message to a channel';
protected $usage = '/sendtochannel <message to send>';
protected $version = '0.1.3';
protected $version = '0.1.4';
protected $need_mysql = true;
/**#@-*/
......@@ -49,7 +49,7 @@ class SendtochannelCommand extends AdminCommand
// Conversation
$conversation = new Conversation($user_id, $chat_id, $this->getName());
$conversation->start();
$session = $conversation->getData();
$channels = (array) $this->getConfig('your_channel');
......
......@@ -30,7 +30,7 @@ class CancelCommand extends UserCommand
protected $name = 'cancel';
protected $description = 'Cancel the currently active conversation';
protected $usage = '/cancel';
protected $version = '0.1.0';
protected $version = '0.1.1';
protected $need_mysql = true;
/**#@-*/
......@@ -47,7 +47,7 @@ class CancelCommand extends UserCommand
$this->getMessage()->getChat()->getId()
);
if ($conversation_command = $conversation->getConversationCommand()) {
if ($conversation_command = $conversation->getCommand()) {
$conversation->cancel();
$text = 'Conversation "' . $conversation_command . '" cancelled!';
}
......
......@@ -27,7 +27,7 @@ class SurveyCommand extends UserCommand
protected $name = 'survey';
protected $description = 'Survery for bot users';
protected $usage = '/survey';
protected $version = '0.1.0';
protected $version = '0.1.1';
protected $need_mysql = true;
/**#@-*/
......@@ -58,10 +58,9 @@ class SurveyCommand extends UserCommand
//tracking
$conversation = new Conversation($user_id, $chat_id, $this->getName());
$conversation->start();
//cache data from the tracking session if any
$session = $conversation->GetData();
$session = $conversation->getData();
if (!isset($session['state'])) {
$state = '0';
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment