Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
first kind of usable version
Browse files Browse the repository at this point in the history
  • Loading branch information
blopa committed Feb 12, 2017
1 parent 2253ee9 commit c863bc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/code/community/Werules/Chatbot/Model/Chatdata.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ private function telegramHandler($apiKey)
}
}

if (!$chatdata->getTelegramChatId() && !$chatdata->checkCommand($text, $chatdata->start_cmd)) // if user isn't registred, and not using the start command
if (is_null($chatdata->getTelegramChatId()) && !$chatdata->checkCommand($text, $chatdata->start_cmd)) // if user isn't registred, and not using the start command
{
$message = Mage::getStoreConfig('chatbot_enable/telegram_config/telegram_welcome_msg'); // TODO
if ($message) // TODO
Expand Down Expand Up @@ -674,6 +674,10 @@ private function telegramHandler($apiKey)
{
$content = array('chat_id' => $chat_id, 'text' => $this->canceledmsg);
}
else if ($chatdata->getTelegramConvState() == $this->send_email_state)
{
$content = array('chat_id' => $chat_id, 'text' => $this->canceledmsg);
}
else
$content = array('chat_id' => $chat_id, 'text' => $this->errormsg);

Expand Down

0 comments on commit c863bc1

Please sign in to comment.