no message

This commit is contained in:
kuaifan
2024-11-21 09:30:08 +08:00
parent ec8d48292e
commit 906d87f43f
5 changed files with 7 additions and 7 deletions

View File

@@ -86,7 +86,7 @@ class BotReceiveMsgTask extends AbstractTask
if ($this->mention) {
$original = preg_replace("/<span class=\"mention user\" data-id=\"(\d+)\">(.*?)<\/span>/", "", $original);
}
if (preg_match("/<span[^>]*?data-quick-key=([\"'])(.*?)\\1[^>]*?>(.*?)<\/span>/is", $original, $match)) {
if (preg_match("/<span[^>]*?data-quick-key=([\"'])([^\"']+?)\\1[^>]*?>(.*?)<\/span>/is", $original, $match)) {
$command = $match[2];
if (str_starts_with($command, '%3A.')) {
$command = ":" . substr($command, 4);