no message
This commit is contained in:
parent
6e210698b1
commit
5fa585611c
@ -19,17 +19,31 @@ final class HookController
|
||||
|
||||
public function cmd_ffq_article()
|
||||
{
|
||||
$sUpdate = file_get_contents("php://input");
|
||||
$aUpdate = json_decode($sUpdate, true);
|
||||
$sText = &$aUpdate["message"]["text"] ?? "没有text";
|
||||
if (!str_starts_with($sText, '/')) {
|
||||
// $this->sCustomCmd = "article";
|
||||
// $this->sCustomFunc = "cache";
|
||||
// $this->aCustomOption[1] = "ffq";
|
||||
$this->sCustomText = "/article#cacheAdd__ffq_tg_a"." ".$sText;
|
||||
try {
|
||||
|
||||
$sUpdate = file_get_contents("php://input");
|
||||
$aUpdate = json_decode($sUpdate, true);
|
||||
$sText = &$aUpdate["message"]["text"] ?? "没有text";
|
||||
if (!str_starts_with($sText, '/')) {
|
||||
// $this->sCustomCmd = "article";
|
||||
// $this->sCustomFunc = "cache";
|
||||
// $this->aCustomOption[1] = "ffq";
|
||||
$this->sCustomText = "/article#cacheAdd__ffq_tg_a"." ".$sText;
|
||||
}
|
||||
|
||||
$this->cmd();
|
||||
|
||||
} catch (\Throwable $e) {
|
||||
|
||||
$aDataTg = ThrowableHandler::make($e)->enableTrace()->fetch();
|
||||
TelegramSlave::fail()->enableSlaveQueue(false)->setMsgA($aDataTg)->send();
|
||||
|
||||
$aDataCmd = $aDataTg;
|
||||
$sDataCmd = json_encode($aDataCmd, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
$sDataCmd = str_replace("\\n", "<br>", $sDataCmd);
|
||||
echo $sDataCmd;
|
||||
exit;
|
||||
}
|
||||
|
||||
$this->cmd();
|
||||
}
|
||||
|
||||
public function cmd()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user