瀏覽代碼

work on call

unknown 2 年之前
父節點
當前提交
17cd22e40a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app.js

+ 1 - 1
app.js

@@ -22,7 +22,6 @@ const io = new Server(server, {
 });
 });
 
 
 io.on('connection', (socket) => {
 io.on('connection', (socket) => {
-	console.log(socket.id);
 	socket.emit('me', socket.id);
 	socket.emit('me', socket.id);
 	socket.on('callTo', async ({ to, signalData, from, userId, companionId }) => {
 	socket.on('callTo', async ({ to, signalData, from, userId, companionId }) => {
 		const { name, lastName, color, avatarUrl, number } =
 		const { name, lastName, color, avatarUrl, number } =
@@ -35,6 +34,7 @@ io.on('connection', (socket) => {
 			color,
 			color,
 			avatarUrl,
 			avatarUrl,
 			number,
 			number,
+			_companionId: userId,
 		});
 		});
 	});
 	});
 	socket.on('answerCall', (data) => {
 	socket.on('answerCall', (data) => {