fix: get socketId from emitted message
This commit is contained in:
parent
4608e809b1
commit
c4ff0594e3
@ -656,8 +656,14 @@ class Collab extends PureComponent<Props, CollabState> {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case "MOUSE_LOCATION": {
|
case "MOUSE_LOCATION": {
|
||||||
const { pointer, button, username, selectedElementIds, userId } =
|
const {
|
||||||
decryptedData.payload;
|
pointer,
|
||||||
|
button,
|
||||||
|
username,
|
||||||
|
selectedElementIds,
|
||||||
|
userId,
|
||||||
|
socketId,
|
||||||
|
} = decryptedData.payload;
|
||||||
const collaborators = upsertMap(
|
const collaborators = upsertMap(
|
||||||
userId,
|
userId,
|
||||||
{
|
{
|
||||||
@ -665,6 +671,7 @@ class Collab extends PureComponent<Props, CollabState> {
|
|||||||
pointer,
|
pointer,
|
||||||
button,
|
button,
|
||||||
selectedElementIds,
|
selectedElementIds,
|
||||||
|
socketId,
|
||||||
},
|
},
|
||||||
this.collaborators,
|
this.collaborators,
|
||||||
);
|
);
|
||||||
@ -674,13 +681,15 @@ class Collab extends PureComponent<Props, CollabState> {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "IDLE_STATUS": {
|
case "IDLE_STATUS": {
|
||||||
const { userState, username, userId } = decryptedData.payload;
|
const { userState, username, userId, socketId } =
|
||||||
|
decryptedData.payload;
|
||||||
const collaborators = upsertMap(
|
const collaborators = upsertMap(
|
||||||
userId,
|
userId,
|
||||||
{
|
{
|
||||||
username,
|
username,
|
||||||
userState,
|
userState,
|
||||||
userId,
|
userId,
|
||||||
|
socketId,
|
||||||
},
|
},
|
||||||
this.collaborators,
|
this.collaborators,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user