mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 13:22:49 +00:00
fix: @在线状态不正确
This commit is contained in:
parent
77e08aa048
commit
84a800f69b
@ -14,6 +14,7 @@ use App\Module\Base;
|
||||
use App\Module\Timer;
|
||||
use App\Module\Extranet;
|
||||
use App\Module\TimeRange;
|
||||
use App\Module\Table\OnlineData;
|
||||
use App\Models\FileContent;
|
||||
use App\Models\AbstractModel;
|
||||
use App\Models\WebSocketDialog;
|
||||
@ -288,6 +289,9 @@ class DialogController extends AbstractController
|
||||
$array = array_filter($data->toArray(), function ($item) {
|
||||
return $item['userid'] > 0;
|
||||
});
|
||||
foreach ($array as &$item) {
|
||||
$item['online'] = $item['bot'] || OnlineData::live($item['userid']) > 0;
|
||||
}
|
||||
} else {
|
||||
$data = WebSocketDialogUser::select(['web_socket_dialog_users.*', 'users.bot'])
|
||||
->join('users', 'web_socket_dialog_users.userid', '=', 'users.userid')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user