This commit is contained in:
payacom
2026-07-28 10:06:42 +03:30
parent a1d7db5e7e
commit 67f59eefdf
129 changed files with 7964 additions and 1561 deletions

View File

@@ -7,6 +7,7 @@ import {
joinUserRoom,
releaseChatSocket,
} from "@/lib/chat/socketClient";
import { ensureIdentityKeys } from "@/lib/e2ee";
export default function ChatSocketProvider({
children,
@@ -21,6 +22,8 @@ export default function ChatSocketProvider({
const socket = acquireChatSocket();
const uid = String(user._id);
void ensureIdentityKeys(uid);
const join = () => joinUserRoom(uid);
socket.on("connect", join);
if (socket.connected) join();