no message
This commit is contained in:
parent
6e210698b1
commit
5fa585611c
@ -19,17 +19,31 @@ final class HookController
|
|||||||
|
|
||||||
public function cmd_ffq_article()
|
public function cmd_ffq_article()
|
||||||
{
|
{
|
||||||
$sUpdate = file_get_contents("php://input");
|
try {
|
||||||
$aUpdate = json_decode($sUpdate, true);
|
|
||||||
$sText = &$aUpdate["message"]["text"] ?? "没有text";
|
$sUpdate = file_get_contents("php://input");
|
||||||
if (!str_starts_with($sText, '/')) {
|
$aUpdate = json_decode($sUpdate, true);
|
||||||
// $this->sCustomCmd = "article";
|
$sText = &$aUpdate["message"]["text"] ?? "没有text";
|
||||||
// $this->sCustomFunc = "cache";
|
if (!str_starts_with($sText, '/')) {
|
||||||
// $this->aCustomOption[1] = "ffq";
|
// $this->sCustomCmd = "article";
|
||||||
$this->sCustomText = "/article#cacheAdd__ffq_tg_a"." ".$sText;
|
// $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()
|
public function cmd()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user