Skip to content

Commit

Permalink
Merge pull request #196 from HanSon/dev
Browse files Browse the repository at this point in the history
修复扩展读取配置
  • Loading branch information
Hanson authored Jul 23, 2017
2 parents 20025ec + ec0ea70 commit 10ae5e9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Extension/AbstractMessageHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ abstract class AbstractMessageHandler
*
* @var
*/
public static $config;
public $config;

/**
* 初始化拓展.
*/
public function init()
{
static::$config = vbot('config')->get('extension.'.$this->name);
$this->config = vbot('config')->get('extension.'.$this->name);

$this->admin();

Expand All @@ -61,6 +61,8 @@ abstract public function handler(Collection $collection);
* 消息处理器.
*
* @param Collection $collection
*
* @return mixed
*/
final public function messageHandler(Collection $collection)
{
Expand All @@ -85,7 +87,7 @@ final public function messageHandler(Collection $collection)
}

if (!$this->status) {
return;
return false;
}

return $this->handler($collection);
Expand Down

0 comments on commit 10ae5e9

Please sign in to comment.