feat: 检查应用是否已安装

This commit is contained in:
王昱
2025-05-23 12:40:33 +08:00
parent 6e03a05e6d
commit 1d92c2668d
7 changed files with 92 additions and 13 deletions
+4 -1
View File
@@ -12,6 +12,7 @@ use App\Models\UserDepartment;
use App\Models\WebSocketDialog;
use App\Models\WebSocketDialogConfig;
use App\Models\WebSocketDialogMsg;
use App\Module\Apps;
use App\Module\Base;
use App\Module\Doo;
use App\Module\Ihttp;
@@ -452,7 +453,9 @@ class BotReceiveMsgTask extends AbstractTask
if (in_array($this->client['platform'], ['win', 'mac', 'web']) && !Base::judgeClientVersion("0.41.11", $this->client['version'])) {
$errorContent = '当前客户端版本低(所需版本≥v0.41.11)。';
}
if (!Apps::isInstalled('ai')) {
$errorContent = '应用「AI Robot」未安装';
}
if ($msg->reply_id > 0) {
$replyCommand = $this->extractReplyCommand($msg->reply_id, $botUser);
if (Base::isError($replyCommand)) {