update to 2.2.7 version

fix reply() bug
fix access_token bug
This commit is contained in:
jerry
2021-02-27 16:19:18 +08:00
parent 2902c5e805
commit 957c69bd1e
5 changed files with 30 additions and 6 deletions

View File

@@ -104,20 +104,22 @@ class Context implements ContextInterface
* @param $msg
* @param bool $yield
* @return mixed
* @noinspection PhpMissingBreakStatementInspection
*/
public function reply($msg, $yield = false) {
switch ($this->getData()["message_type"]) {
case "group":
$operation["at_sender"] = false;
// no break
case "private":
case "discuss":
$this->setCache("has_reply", true);
$data = $this->getData();
$conn = $this->getConnection();
$operation["reply"] = $msg;
return (new ZMRobot($conn))->setCallback($yield)->callExtendedAPI(".handle_quick_operation", [
"context" => $data,
"operation" => [
"reply" => $msg
]
"operation" => $operation
]);
}
return false;