mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 07:35:34 +08:00
update to 2.2.7 version
fix reply() bug fix access_token bug
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user