mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-24 17:15:36 +08:00
fix action response on bot action
This commit is contained in:
@@ -92,7 +92,7 @@ trait BotActionTrait
|
|||||||
if ($response instanceof ActionResponse) {
|
if ($response instanceof ActionResponse) {
|
||||||
$handler = new AnnotationHandler(BotAction::class);
|
$handler = new AnnotationHandler(BotAction::class);
|
||||||
$handler->setRuleCallback(fn (BotAction $act) => ($act->action === '' || $act->action === $action) && $act->need_response);
|
$handler->setRuleCallback(fn (BotAction $act) => ($act->action === '' || $act->action === $action) && $act->need_response);
|
||||||
// container()->set(ActionResponse::class, $response);
|
container()->set(ActionResponse::class, $response);
|
||||||
$handler->handleAll();
|
$handler->handleAll();
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user