no message

This commit is contained in:
kuaifan
2024-09-16 23:31:19 +08:00
parent c39fc80c02
commit 9a69f3b019
6 changed files with 41 additions and 29 deletions
+6
View File
@@ -194,6 +194,12 @@ class WebSocketService implements WebSocketHandlerInterface
Cache::put("User::fd:" . $fd, "on", Carbon::now()->addDay());
Cache::put("User::online:" . $userid, "on", Carbon::now()->addDay());
//
$all = Base::json2array(Cache::get("User::online:all"));
if (!isset($all[$userid])) {
$all[$userid] = $userid;
Cache::forever("User::online:all", Base::array2json($all));
}
//
WebSocket::updateInsert([
'key' => md5($fd . '@' . $userid)
], [