房间密码

This commit is contained in:
2026-01-23 12:10:59 +08:00
parent 1b7ecc29d8
commit fa0fd7c28b

View File

@@ -1032,7 +1032,7 @@ class Room extends Model
Cache::set('room_info_' . $room_id, json_encode($room), 7200);
}
if(isset($room['room_password']) && $user_id != $room['user_id']){
if(isset($room['room_password']) && $room['room_password'] != '' && $user_id != $room['user_id']){
if (empty($password) || $room['room_password'] != $password) {
return ['code' => 0, 'msg' => '密码错误', 'data' => ''];
}