mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
fix issue #336
This commit is contained in:
@@ -90,6 +90,10 @@ trait BotActionTrait
|
|||||||
BotMap::$bot_coroutines[$a->echo] = $co->getCid();
|
BotMap::$bot_coroutines[$a->echo] = $co->getCid();
|
||||||
$response = $co->suspend();
|
$response = $co->suspend();
|
||||||
if ($response instanceof ActionResponse) {
|
if ($response instanceof ActionResponse) {
|
||||||
|
$handler = new AnnotationHandler(BotAction::class);
|
||||||
|
$handler->setRuleCallback(fn (BotAction $act) => ($act->action === '' || $act->action === $action) && $act->need_response);
|
||||||
|
// container()->set(ActionResponse::class, $response);
|
||||||
|
$handler->handleAll();
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user