Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-01-14 23:25:15 +00:00 committed by StyleCI Bot
parent 6711f6e814
commit cec3294a3a
2 changed files with 5 additions and 3 deletions

View File

@ -24,11 +24,13 @@ trait UpdateHandler
private $getting_state = false; private $getting_state = false;
public $full_chats; public $full_chats;
public function full_chat_last_updated($id)
public function full_chat_last_updated($id) { {
$id = $this->get_info($id)['bot_api_id']; $id = $this->get_info($id)['bot_api_id'];
return isset($this->full_chats[$id]['last_update']) ? $this->full_chats[$id]['last_update'] : 0; return isset($this->full_chats[$id]['last_update']) ? $this->full_chats[$id]['last_update'] : 0;
} }
public function pwr_update_handler($update) public function pwr_update_handler($update)
{ {
if (isset($update['message']['to_id']) && time() - $this->full_chat_last_updated($update['message']['to_id']) <= 600) { if (isset($update['message']['to_id']) && time() - $this->full_chat_last_updated($update['message']['to_id']) <= 600) {