mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 03:52:50 +00:00
feat: 临时账号可以主动跟机器人聊天
This commit is contained in:
parent
a9033c610b
commit
05f20eb761
@ -560,7 +560,7 @@ class WebSocketDialog extends AbstractModel
|
|||||||
if ($dialogUser) {
|
if ($dialogUser) {
|
||||||
return $dialogUser;
|
return $dialogUser;
|
||||||
}
|
}
|
||||||
if ($receiver > 0 && $user->isTemp()) {
|
if ($receiver > 0 && $user->isTemp() && !User::whereUserid($receiver)->whereBot(1)->exists() ) {
|
||||||
throw new ApiException('无法发起会话,请联系管理员。');
|
throw new ApiException('无法发起会话,请联系管理员。');
|
||||||
}
|
}
|
||||||
return AbstractModel::transaction(function () use ($receiver, $user) {
|
return AbstractModel::transaction(function () use ($receiver, $user) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user