|
@@ -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) => {
|