Commit c29efe72 by HanSon

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/Collections/ContactFactory.php
2 parents 94892c7c 165a300c
......@@ -3,7 +3,7 @@
## 环境要求
* PHP >= 7(代码中使用了一些PHP7的特性)
* PHP >= 5.6
## 安装
......@@ -13,7 +13,7 @@
composer require hanson/vbot
```
2、直接下载[release](https://github.com/HanSon/vbot/files/719331/vbot.zip)
2、直接下载[release](https://github.com/HanSon/vbot/files/754871/vbot.zip)
然后执行``` php example/index.php ```
......@@ -144,4 +144,4 @@ $robot->server->run();
有问题或者建议都可以提issue
或者加入我新建的QQ群:492548647
\ No newline at end of file
或者加入我新建的QQ群:492548647
......@@ -16,7 +16,6 @@
"pimple/pimple": "^3.0",
"illuminate/support": "^5.3",
"nesbot/carbon": "^1.21",
"php": ">=7.0.0",
"aferrandini/phpqrcode": "^1.0",
"symfony/console": "3.*"
},
......
......@@ -33,7 +33,9 @@ class ContactFactory
$this->makeContactList();
myself()->alias = contact()->get(myself()->username)['Alias'] ?? myself()->nickname ? : myself()->username;
$contact = contact()->get(myself()->username);
myself()->alias = isset($contact['Alias']) ? $contact['Alias'] : myself()->nickname ? : myself()->username;
$this->getBatchGroupMembers();
......
......@@ -194,9 +194,11 @@ class MessageHandler
{
message()->put($message->msg['MsgId'], $message);
$file = fopen(System::getPath() .'message.json', 'a');
fwrite($file, json_encode($message) . PHP_EOL);
fclose($file);
if(server()->config['debug']) {
$file = fopen(System::getPath() . 'message.json', 'a');
fwrite($file, json_encode($message) . PHP_EOL);
fclose($file);
}
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!