post
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user