no message
This commit is contained in:
parent
7ee6c7c885
commit
40b9666819
@ -23,8 +23,8 @@ final class HookController
|
||||
|
||||
$sUpdate = file_get_contents("php://input");
|
||||
$aUpdate = json_decode($sUpdate, true);
|
||||
$aUpdate["message"]["text"] = $aUpdate["message"]["text"] ?? "没有text";
|
||||
if (!str_starts_with($aUpdate["message"]["text"], '/')) {
|
||||
$sText = $aUpdate["message"]["text"] ?? "没有text";
|
||||
if (!str_starts_with($sText, '/')) {
|
||||
// $this->sCustomCmd = "article";
|
||||
// $this->sCustomFunc = "cache";
|
||||
// $this->aCustomOption[1] = "ffq";
|
||||
@ -68,15 +68,15 @@ final class HookController
|
||||
$aData['chatId'] = (string) $aUpdate["message"]["chat"]["id"];
|
||||
$aData['fromId'] = (string) $aUpdate["message"]["from"]["id"];
|
||||
|
||||
if ($this->sCustomText) {
|
||||
$aUpdate["message"]["text"] = $this->sCustomText;
|
||||
}
|
||||
|
||||
if (!isset($aUpdate["message"]["text"])) {
|
||||
throw new \Exception(json_encode($aUpdate));
|
||||
}
|
||||
|
||||
if ($this->sCustomText) {
|
||||
$sText = $this->sCustomText;
|
||||
} else {
|
||||
$sText = $aUpdate["message"]["text"] ?? "没有text";
|
||||
}
|
||||
$sText = $aUpdate["message"]["text"];
|
||||
|
||||
// hook优先
|
||||
// 非is_hook,并且,首字符非/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user