perf: 支持会话自己

This commit is contained in:
kuaifan
2022-05-25 23:06:42 +08:00
parent 3ce2ec0a46
commit 1d8b4ba83f
7 changed files with 48 additions and 41 deletions

View File

@@ -111,8 +111,8 @@ class DialogController extends AbstractController
$user = User::auth();
//
$userid = intval(Request::input('userid'));
if ($userid == $user->userid) {
return Base::retError('不能对话自己');
if (empty($userid)) {
return Base::retError('错误的会话');
}
//
$dialog = WebSocketDialog::checkUserDialog($user->userid, $userid);